Android Battery Lib, Java FFI example

Moderators: LCMark, LCfraser

Post Reply
PaulDaMacMan
Posts: 126
Joined: Wed Apr 24, 2013 4:53 pm

Android Battery Lib, Java FFI example

Post by PaulDaMacMan » Thu Apr 27, 2017 4:30 am

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

capellan
Posts: 363
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Android Battery Lib, Java FFI example

Post by capellan » Thu Apr 27, 2017 2:29 pm

Hi Paul,

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

Al

PaulDaMacMan
Posts: 126
Joined: Wed Apr 24, 2013 4:53 pm

Re: Android Battery Lib, Java FFI example

Post by PaulDaMacMan » Fri Apr 28, 2017 5:09 am

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.

capellan
Posts: 363
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Android Battery Lib, Java FFI example

Post by capellan » Sat Apr 29, 2017 3:04 am

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... :(

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5344
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Android Battery Lib, Java FFI example

Post by FourthWorld » Sat Apr 29, 2017 5:21 am

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. :)
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

PaulDaMacMan
Posts: 126
Joined: Wed Apr 24, 2013 4:53 pm

Re: Android Battery Lib, Java FFI example

Post by PaulDaMacMan » Sat Apr 29, 2017 5:01 pm

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.

capellan
Posts: 363
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Android Battery Lib, Java FFI example

Post by capellan » Sat Apr 29, 2017 8:13 pm

@ 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

PaulDaMacMan
Posts: 126
Joined: Wed Apr 24, 2013 4:53 pm

Re: Android Battery Lib, Java FFI example

Post by PaulDaMacMan » Mon May 01, 2017 5:25 pm

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.

PaulDaMacMan
Posts: 126
Joined: Wed Apr 24, 2013 4:53 pm

Re: Android Battery Lib, Java FFI example

Post by PaulDaMacMan » Mon May 01, 2017 5:31 pm

Uploaded Android 4 version to GitHub:
Get Battery Tests ICS.apk

Post Reply

Return to “LiveCode Builder”