Page 1 of 1

Android Battery Lib, Java FFI example

Posted: Thu Apr 27, 2017 4:30 am
by PaulDaMacMan
I set up a git hub project based on the Android Battery Lib example from Ali Loyd's blog post https://livecode.com/livecode-9-0-dp-6- ... e-preview/
I added a few more functions, but some of them may not be working properly. The voltage & technology functions are not returning info on my device (Galaxy Note 5, Android 7.0), but the others are working fine.
https://github.com/PaulMcClernan/LCAndroidBatteryLib

Re: Android Battery Lib, Java FFI example

Posted: Thu Apr 27, 2017 2:29 pm
by capellan
Hi Paul,

Do you have an APK that we could install in our Android device?

Al

Re: Android Battery Lib, Java FFI example

Posted: Fri Apr 28, 2017 5:09 am
by PaulDaMacMan
capellan wrote:Hi Paul,

Do you have an APK that we could install in our Android device?

Al
Well I could upload my .apk build I guess, but I don't see the point in doing that.
There is a stack in my repo called GetBatteryTest.livecode that I used to build a test .apk from.
More importantly you need to build the battery lib extension from LCAndroidBatteryLibExp.lcb to include in the test .apk first.

Re: Android Battery Lib, Java FFI example

Posted: Sat Apr 29, 2017 3:04 am
by capellan
At least in my own case, my Linux computer (that compile
Android Apps) is out of service until new RAM memory
arrives from an online store... :(

Re: Android Battery Lib, Java FFI example

Posted: Sat Apr 29, 2017 5:21 am
by FourthWorld
capellan wrote:At least in my own case, my Linux computer (that compile
Android Apps) is out of service until new RAM memory
arrives from an online store... :(
I know your pain, Alejandro. It's happened to me before. If it's not RAM it's hard drives. Hang in there, and maybe catch up on some old movies while you're waiting for the chips to arrive. :)

Re: Android Battery Lib, Java FFI example

Posted: Sat Apr 29, 2017 5:01 pm
by PaulDaMacMan
OK I uploaded my test apk to the git repo
I haven't worked on this again since.
Two functions, GetBatteryTechnology() & GetBatteryVoltage() don't seem to work and return nothing on my phone.

Re: Android Battery Lib, Java FFI example

Posted: Sat Apr 29, 2017 8:13 pm
by capellan
@ Paul, Many Thanks for posting this APK! I downloaded it and try to install.
Which Android version requires this apk?

@ Richard, Patience is my best friend! :D

Al

Re: Android Battery Lib, Java FFI example

Posted: Mon May 01, 2017 5:25 pm
by PaulDaMacMan
capellan wrote:@ Paul, Many Thanks for posting this APK! I downloaded it and try to install.
Which Android version requires this apk?

@ Richard, Patience is my best friend! :D

Al
Oh I think I had it set for Android 5 due to having problems at first, it should probably be changed back to 4 as I don't think 5 was actually needed.

Re: Android Battery Lib, Java FFI example

Posted: Mon May 01, 2017 5:31 pm
by PaulDaMacMan
Uploaded Android 4 version to GitHub:
Get Battery Tests ICS.apk