Android Question Why my B4A App. Doesn't Install on Android 15 ?

amir hosein

Member
Hello Everyone .
I prepared a B4A app. 4 years ago and it ran (runs) on Android 10 .
I bought a New phone with Android 15 and my App. Doesn't install on it .
The libraries which my App. is used are : Dialogs , IME , Javaobject , MLwifi400 , Network ,Phone , PrefrenceActivity , RandomAccessFile , Reflection , ScrollView2D , SQL (Table Module) , StringUtils
I also have a socket_service module in my App.
If there is any recommendation to make an App. under Android 15 , Please let me know .

Thanks for your responses

Regards
 

Peter Simpson

Expert
Licensed User
Longtime User
I bought a New phone with Android 15 and my App. Doesn't install on it .
It's most probably permissions, your may need to use runtime permissions. Press the list permissions button, and post a screenshot of your apps permissions.
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
XML:
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
is the point of start.
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
MLwifi400 → broken on Android 10+ (WiFi SSID, MAC access restricted). You’ll need to replace it with MLWiFi v1.42+ or switch to PhoneEvents + Network libraries.
Phone library → some methods (IMEI, SIM info, etc.) now require READ_PHONE_STATE and in Android 13+ may return blank unless the app is carrier-privileged.
File access → RandomAccessFile and file-based APIs can’t freely use /storage/emulated/0/… anymore. Use RuntimePermissions + FileProvider or store inside App-Specific folders (File.DirInternal or File.DirInternalCache).
Dialogs, IME, JavaObject, Network, Phone, PreferenceActivity, RandomAccessFile, Reflection, ScrollView2D, SQL, StringUtils → still fine with latest B4A.
MLwifi400 → obsolete, needs replacement.
PreferenceActivity → deprecated, but still works if migrated to PreferenceManager.
 
Upvote 0

amir hosein

Member
Hello again .
I checked the MLWifi400 version and it was the latest version (v4.41) .
I have to use RandomAccessFile library because I have a Socket_service that uses AsyncStream object .
I used DirAsset for reading a file .
My B4A IDE version is 12.5 now . Is it must to update to latest version ?

My Permissions in the Manifest Editor is as follow :

AddManifestText(
<uses-sdk android:minSdkVersion="5"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

'MLWiFi
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.ACCESS_WIFI_STATE)
AddPermission(android.permission.CHANGE_WIFI_STATE)

Thanks for your help
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
Change:
B4X:
<uses-sdk android:minSdkVersion="5"/>
To:
B4X:
<uses-sdk android:minSdkVersion="26"/>
 
Upvote 0

Mehrzad238

Active Member
My B4A IDE version is 12.5 now . Is it must to update to latest version ?
I have a suggestion:

Try to create a new app with a whole new SDK with this link and instructions.
And then start page by page, line by line, library by library, to copy into your new project to see if the problem still stands or not

I use this to resurrect an old project of mine, and if there is anything wrong, I have to replace it, and it always works.
 
Upvote 0

Jeanc161

Member
Licensed User
Longtime User
Hello again .
I checked the MLWifi400 version and it was the latest version (v4.41) .
I have to use RandomAccessFile library because I have a Socket_service that uses AsyncStream object .
I used DirAsset for reading a file .
My B4A IDE version is 12.5 now . Is it must to update to latest version ?

My Permissions in the Manifest Editor is as follow :

AddManifestText(
<uses-sdk android:minSdkVersion="5"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

'MLWiFi
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.ACCESS_WIFI_STATE)
AddPermission(android.permission.CHANGE_WIFI_STATE)

Thanks for your help
I had the same king of problem earlier on to access files on File.DirInternal using the RandomAccess file access.

I use a complex object that only use RandomAccess .writeB4xObject and readB4xObject. on android 13, androis 15 is the same thing so i think there is a problem in the randomAccess librarry to access files on internal directory. One thing also is that yous have to give permissions to USB installation app on android 13,14,15 so the thing that i did is install the app the first time using b4aBridge to alloy playprotect to validate the file. You have to choose the option on the dialog because the playprotect will not allow the app to be installed so i use the option install anyway or something like that i don't remember exactly the full name but it is at the bottom of the dialog and that will allow installing manually the app.
So waht it does it give you permisions to install your app even if it does not come from playStore (Beleive me i have a great deal of problems too to install my app on android 13) once it is installed and you don't remove the app from the phone or tablet you will be able to install your app without usin the b4aBridge and only using the USB cable.

But for access to File.DirInternal with complex object using randomAccess it will not work. What i found it is possible to write simple file like Map or String and that work all the time.
So check your permissions or instead of using the File.DirInternal i created a Folder under /storage/emulated/0/ (or /1/ if using external SDCard) with just simple permission like using .permission._MANAGE_EXTERNAL_STORAGE AND (READ_MEDIA_AUDIO ??).
i HAVE TO CHANGE A LOT OF CODE TO SUIT THE CHANGES IN SECURITY of the new android version. The file.WriteString, File.writemap works without a flaw so if you have complex object to save to dirInternal or DefaultExternal it won't work at all. What i found is the File.writestring use the outputstream or inputstream to read or write to these folders.

Anyway have fun like me to fix your app for the new versions of android it is a pain in the butt beleave me.
 
Upvote 0

Jeanc161

Member
Licensed User
Longtime User
post the complete content of the manifest-editor in the IDE

Your code is missing some parts which are required.
it is also in the android permissions for app playprotect is giving a lot of buzz
Once i allow app even b4aBridge to access files at least one it install perfectly android 13,14,15 is now a pain in the butt to work with for developpers

the folders are read and write protect even for File manager can not access theses android/data/files/app.com/files it was a pain to be even able to create my own folder to store data. Welcome to the new stupidity of google Have Fun
Good luck
 
Upvote 0
Top