Android Question How to Detect Available Internal Memory

cbanks

Active Member
Licensed User
Longtime User
Right now I am using the OSLibrary library to detect free internal memory with this command: OS.AvailableInternalMemorySize

But, is there a way to detect the same thing without using the OSlibrary because the OSlibrary requires so many permissions and my users don't like seeing all of those required permissions?

oslibrary requires these permissions:
android.permission.INTERNET
android.permission.REBOOT
android.permission.DUMP
android.permission.ACCESS_NETWORK_STATE
android.permission.BATTERY_STATS
android.permission.KILL_BACKGROUND_PROCESSES
android.permission.WRITE_SETTINGS
android.permission.GET_TASKS
 

thedesolatesoul

Expert
Licensed User
Longtime User
Upvote 0

cbanks

Active Member
Licensed User
Longtime User
If you are not using those actions then you can just remove those permissions manually in the manifest.

Alternatively you can use this one: http://www.b4x.com/android/forum/th...d-osstats-and-getforegroundapp.34954/#content
It also adds android.permission.GET_TASKS but you can remove it.

None of those options in the MSOS library give me the same result as OS.AvailableInternalMemorySize from the OSlibrary. I"m looking for how much internal space is free. The result should be a static number, unless an app is installed to internal storage or data is created on the internal storage.
 
Last edited:
Upvote 0
Top