Re:Measuring fragmentation in Android
by rogerbinns on Sunday February 26, 2012 @02:17PM
(#3636468)
You could have made some initialisation calls in Java to get the various values from Environment and similar and then passed them on to your native code.
Re:Measuring fragmentation in Android
by gravitronic on Sunday February 26, 2012 @06:30PM
(#3637163)
Thanks. I will look this up for future versions. Annoying to have to bridge it myself but better than my current solution (which is actually the suggested solution when looking on stack exchange at this exact issue :/ )
Re:Measuring fragmentation in Android
by rogerbinns on Sunday February 26, 2012 @09:27PM
(#3637548)
Although it is technically possible to implement the entire app in native code, you will find it far easier to use some Java as well.
Re:Measuring fragmentation in Android
by gravitronic on Monday February 27, 2012 @10:50AM
(#3639345)
Using the ports of SDL my app runs the same codebase for WebOS, Android, RIM Playbook and soon Apple iOS. While I already have a few Android-specific shims I'm trying to remain as platform-independent as possible to ease porting.
For example, /mnt/sdcard might be the internal storage. Or an SD Card. Where's the other mount point? You have to parse /proc/mounts to figure it out. How do you know which are which? I ended up writing a ton of rules like mount the point if (isEXT || isFAT || isFUSE && (not in a list of system mount points like /data)). There's no API (at least on the NDK side).