wikki74
September 3, 2021, 8:52am
4
Dear @Patryk_F ,
Thank you!
I know the "problem" with Android 11 and have changed blocks as follows:
in COMPANION, everything is working, see screenshots:
Here we have the path of the file and the filename:
And as a result, the image is in the correct folder after moving:
But as mentioned, after INSTALLING the apk on the phone, i am getting errors
PS: AndroidFile is Taifuns File extension
wikki74
September 3, 2021, 8:54am
5
Yes, but i didnt find THIS specific EPERM error
wikki74
September 3, 2021, 9:12am
6
Ok, now I am getting an other error:
"Sorry can't move a directory"
wikki74
September 3, 2021, 10:07am
8
Hi Anke,
Thank you very much, I will try it when im at home again.
But it is working in companion, even the directory was not exisiting before (see post)
From the ASD directly it can not be shared, using the WEB component i assume?
Anke
September 3, 2021, 10:39am
9
It's not about whether the folder can be created, but about whether it makes sense to create one that generates the ASD path twice.
Taifun
September 3, 2021, 5:39pm
10
it can be shared from there
btw. why do you have 2 solutions? you might want to store in ASD for all Android API Levels...
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.
wikki74
September 3, 2021, 7:41pm
11
in sdk > 30? but how? with the web component it does not work...
Taifun
September 3, 2021, 7:49pm
12
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.
Another idea would be to convert the file to a Base 64 string using an extension and upload it to the server using PHP.
Hello friends,
there are several ways to upload a file to our server: FTP, Postfile,… in this example we are going to convert the file into text using a Base 64 extension and upload that text using PHP.
You can download the extension com.KIO4_Base64.aix of:
http://kio4.com/appinventor/277_extension_imagen_string.htm
In this example I will use 000webhost server
[phpsubir]
<?php
// Juan A. Villalpando
// kio4.com
// https://kio4.000webhostapp.com/dibujo.jpg
$datos=$_POST;
$contenido=$datos[…
Taifun
September 4, 2021, 2:41pm
15
you are trying to share from the
/Download
folder and not from the ASD
also you should redesign your app and store your data in the ASD rather than in directory
/kundc
... remember the new Google restrictions... see also
I have added another detail to my overview (top right, see pink box) and thus completed the overview.
( I hope. )
[grafik]
EDIT: usually a full path starts with file:///
(3 slashes)
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.
wikki74
September 5, 2021, 7:20am
16
Yes, I am trying to share from /Download, as sharing from ASD has give me errors (see post 1)
Best would be to save and share from ASD, but it does not work
wikki74
September 5, 2021, 8:45am
18
Dear Anke,
thank you very much for the suggestion and help, perhaps I should explain from the begiining what I am trying to do (and what IS working below Andoid 11)
First, the Canvas (a signature) sould be saved:
When all is finished, the signature should be uploaded to my server:
As mentioned, this is working on all devices below Android 11 (SDK < 29)
Now the problem is, that when SDK 30 was hiiting, this solution does not work anymore.
So the question is, how can this be adapted to work on both (below 30 AND with sdk 30)
I tried to SAVE in the ASD, which is working, but I can NOT UPLOAD it from there, for this reason I thought I would work when I move the file outside from the ASD to another folder, but this does also not work.
So, how can my png file be uploaded DIRECTLY from the ASD ?
Anke
September 5, 2021, 9:27am
19
I had no problems with that (uploading a file from the ASD
to my server) using this extension:
1.Introduction
Description: Using this extension you can connect to a remote server and do various functions such as creating and deleting dirs, uploading and downloading files,etc.
Latest Version: 4
Released: 2020-12-31T18:30:00Z (UTC)
Last Updated: 2023-07-14T18:30:00Z (UTC)
Permissions: android.permission.INTERNET,android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE
2.Blocks
[image]
[image]
[image]
[image]
[image]
[image]
3.Documentation
Events
…
I checked it again on Android 11: Works fine .
1 Like
TIMAI2
September 5, 2021, 10:33am
20
Working OK for me, companion and compiled on Andoid 11
Perhaps check how your php is working ?
wikki74
September 5, 2021, 12:56pm
21
Thank you @TIMAI2 and @Anke ,
after further investigation I think that the problem is NOT this part of the app.
When Button Upload is pressed, at first an email (with Taifuns Extension) is sent and if email sent = successful then upload etc will be made.
But Email is NOT sent successful in Android 11, so I have to take a further look at it.
TIMAI2
September 5, 2021, 1:59pm
22
Thanks for letting us know.....