Integrity & permissions check

ukimiku

Active Member
Licensed User
Longtime User
1) Can a B4A app check whether it has a certain permission, i.e. the permission to send a text message (SMS)? I ask because users can use tools like "APK Edit", remove a certain permission from the AndroidManifest.xml file, and restore the altered app to the phone. When the app then tries to send an sms, it might crash. I would like to trap this error, so I would like to find a way to check whether or not my app (still) has the permission, before it tries to do so.

2) Can a B4A app check programmatically whether or not it has been altered (changed icon, app name, contents, etc.) in any way? Can a B4A app determine the directory in which it resides and then inspect its own code?

Thank you!

Regards,
 

ukimiku

Active Member
Licensed User
Longtime User
Thank you. I will look into Reflection.

I was wondering: Suppose I had another program calculate a checksum for my app right after compilation on Windows, then would there be a way to verify this checksum from within my app on Android? I suppose my app cannot silently launch another app to calculate a confirmation checksum once it is onboard an Android device, so how could one go about that?

Regards,
 
Upvote 0
Top