Android Question Another ‘blessing’ from Android 14?

BlueVision

Active Member
Licensed User
Longtime User
I'm really not a big fan of the newer Android versions, but things are clearly going too far.
I've been trying for three weeks to make an SDK29 app fit for SDK34. I won't succeed, at the latest with SDK32 it's over for the time being, because from SDK33 onwards I can no longer access the download folder with the app to import data downloaded from there into an SQL database. This is still possible with SDK32.
The database itself should of course end up in the app's data folder, that's where it makes sense. However, the structure of the database needs to be customised. Now this is not quite so easy with an SQL database with 12 tables and I would also like to have a look at the database itself after my app has made changes to it. So far, I have always sent it to the PC via Bluetooth and viewed it there with a viewer. Sending them directly from the data folder of an app has been blocked recently. Let's just copy then the database somewhere else. However, the viewer cannot open the transferred file because it supposedly contains ‘read only’ data. You can't see anything at all in the viewer on the PC. But the database works on the smartphone together with the app.
It can't be that I am now prevented from seeing my own database when developing the app. Do I really have to use the app to copy the database to another database that is not in the data folder in order to see the data?

Does anyone have a similar problem?

Cheers BV
 

aeric

Expert
Licensed User
Longtime User
I once have this situation before. I can't really remember the details.
You can still debug the app and read the data into Logs.
You can copy the database as other file extension or as byte data then "Upload" or "Email" to a cloud storage that you can access.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Are you saying that MANAGE_EXTERNAL_STORAGE permission does not work on Android 14 when targeting SDK 34? I can't test it myself as I don't have an Android phone with Android 14 - which presumably is the problem as for me it works on Android 13 when targeting SDK34,

Additionally I extensively use 'Cx File Explorer' which is in the Play Store with permission from Google to use MANAGE_EXTERNAL_STORAGE permission as it needs it to fulfil it's core purpose. Inspecting the package I can see that it is targeting SDK 34 and have heard no howls of frustration that it, or any other file explorer has stopped working on Android 14, nor can I find any indication in Google's Android docs that anything has changed regarding this.
 
Upvote 0

Filippo

Expert
Licensed User
Longtime User
Additionally I extensively use 'Cx File Explorer'
I have also been using this app for a long time, but since Android 14 this app can no longer display the contents of the folder.
You can only access the app folder via the USB cable and Windows Explorer.

View from 'Cx File Explorer':
1728980875133.png

1728980883284.png


View from Windows-Explorer via USB cable:
1728980910314.png

1728980918523.png
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Thanks for the information @Filippo. All File Explorers use a loophole in ExternalStorage to access Android/* folders, not MANAGE_EXTERNAL_STORAGE which they use for all other folders. I describe it here.
Though it looks like the loophole has been closed as I warned in the last EDIT: here.

So if Cx File Explorer, and presumably all other File Explorers can still use MANAGE_EXTERNAL_STORAGE it looks like @BlueVision has a different problem.
 
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
Are you saying that MANAGE_EXTERNAL_STORAGE permission does not work on Android 14 when targeting SDK 34? I can't test it myself as I don't have an Android phone with Android 14 - which presumably is the problem as for me it works on Android 13 when targeting SDK34,
It looks exactly like that.
I tried with your testprogram (you remember the logging of the permission settings).
I compiled the program with B4A 13 MaxSDK34, sent it to my samsung A55 (Android 14), answered the permission dialog and in the logs -> "No Permission".
Same with MaxSDK33 -> "No Permission"
Then with MaxSDK32 -> "Permission granted" and it works.
I have no idea about the goals of the Google developers, but when they close this last door for reaching the download folder, then there is no way to get access to a downloaded file from another software or sent by bluetooth from another device.

This is the status as it looks to me me at the moment. Maybe others can try the same.
 
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
I use “MANAGE_EXTERNAL_STORAGE” in all my apps and have no problems.
You are using SDK34 hardware Filippo?
Maybe it's something special on my phone. We need more testers.
I love using CX on my phone too. Strange thing with it is, I can see the content of App/Data. I can delete it from that folder. But I can not send a file out of this folder with CX, that was possible earlier (for having a look into my database as written above). Same with the downoad folder. Moving content from an app's data folder to a different place is somehow restricited too. The copied database with the same filesize is shown empty or not accessible when transferred to windows, because of a "read-only-status" of the file. I don't know if this comes from Android or if it's a problem of CX. Another thing other users could check on a SDK34 phone.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
I'm really not a big fan of the newer Android versions, but things are clearly going too far.
I've been trying for three weeks to make an SDK29 app fit for SDK34. I won't succeed, at the latest with SDK32 it's over for the time being, because from SDK33 onwards I can no longer access the download folder with the app to import data downloaded from there into an SQL database. This is still possible with SDK32.
The database itself should of course end up in the app's data folder, that's where it makes sense. However, the structure of the database needs to be customised. Now this is not quite so easy with an SQL database with 12 tables and I would also like to have a look at the database itself after my app has made changes to it. So far, I have always sent it to the PC via Bluetooth and viewed it there with a viewer. Sending them directly from the data folder of an app has been blocked recently. Let's just copy then the database somewhere else. However, the viewer cannot open the transferred file because it supposedly contains ‘read only’ data. You can't see anything at all in the viewer on the PC. But the database works on the smartphone together with the app.
It can't be that I am now prevented from seeing my own database when developing the app. Do I really have to use the app to copy the database to another database that is not in the data folder in order to see the data?

Does anyone have a similar problem?

Cheers BV
What I've found recently. My database file is in my app folder and of course on my Android 14 phone I can't see this folder at all from my phone files viewer app.
But if I connect my phone to my PC (Win 10) via USB I can see all my phone's folders in my PC file explorer.

Just downloaded CX File Explorer on my Android 14 phone and it works file for me - I can see my app folders.
 
Last edited:
Upvote 0

agraham

Expert
Licensed User
Longtime User
Upvote 0

agraham

Expert
Licensed User
Longtime User
from Android 13-14 (I don't have Android 12) it no longer works.
Can you clarify this. Does it mean that none of the file system is visible or only the Android/* folders?

On my Android 13 Pixel 4a Cx File Explorer can still access all files except Android/* using MANAGE_EXTERNAL_STORAGE and the loophole in ExternaSorage to access the Android/* folders still works.
 
Upvote 0

Filippo

Expert
Licensed User
Longtime User
Can you clarify this. Does it mean that none of the file system is visible or only the Android/* folders?

On my Android 13 Pixel 4a Cx File Explorer can still access all files except Android/* using MANAGE_EXTERNAL_STORAGE and the loophole in ExternaSorage to access the Android/* folders still works.
Only the Android folders are not visible with “Cx File Explorer ”.
With MANAGE_EXTERNAL_STORAGE no problems, I can even create a new folder.
 
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
Mates I will investigate further. Problem is very complex. I gave agraham's program a run again. It tell's me also under SDK34 a PERMISSION GRANTED. However, when it comes to pick up a file from the download folder, I had to step back to SDK32 for making it work. So there is probably something interfering else in MY program as you told me. Have to eliminate some other "glitches" in my program before I can continue hunting that phenomenon. So this are nearly 9000 lines of code, it's a massive app running for years on many phones in the past and the customer requested localization. So I have to put every description of a button, every label and the messages into a table of variables. Additionally doing this for the SQL database containing 12 tables... So you have an idea what's going on here and the restrictions on newer Android versions are on top. The application itself was limited to MaxSDK29 until now. But SDK29 is to "old" for installing on newer phones, simply not installable. To test it, I had to buy a new phone, without testing it on a SDK34 device physically, you are totally lost. So with B4A 13.0 now and making some changes I could reach SDK32. With this and MANAGE_EXTERNAL STORAGE permission it runs on the A55 and I have access to the download folder with my app. But switching to MaxSDK>32 makes it impossible to reach the folder with MANAGE_EXTERNAL_STORAGE.
Gimme some time pls. There is much pressure with the deadline of making the application "fly" again, SDK32 will be ok for the moment. I will give you the results here as soon as I can here in this thread.
 
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
Guys, I'm sorry, you were right. After diving deep into my 5 year old code and tidying it up a bit, the whole thing works with MaxSDK34.
Maybe you know the feeling of analysing your old code over and over again and wondering why the hell you made it so complicated back then. So you rewrite the code and it works.
No problems with agraham's MANAGE_EXTERNAL_STORAGE, no problem accessing the download folder.

Lost in the code. The explanation is then actually quite simple.
The permission itself always worked. Since this permission was stored in the app once, it was enabled on the phone for this app. I need it to access a file created by another software in the download folder. Its data must be processed. The name of this file is variable. I determine it with the wildcards2 routine. The name of the file then ends up in a variable. If you then delete this variable, of course, there is no longer a file for the app in the download folder. I have no idea why this suddenly worked with SDK32. I must have changed something else in the code.

Evolutionary programme code can become very difficult to control over the course of time, especially as, thanks to Google, you are constantly forced to modify functioning code again and again and thus introduce new errors.

The error was where it always was. It usually sits right in front of the computer...

It is far from over. The GPS library is ‘outdated’ and must be replaced by the GNSS library. Definitely not a problem. I suspect nasty surprises...
Many thanks for your help and persistence, in the end you were right. Case closed for now...

Cheers
 
Upvote 0
Top