Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #551 // Android Battery Test (Lua)

Lua code

require "android"

l = android.getBatteryLevel()
text = "Battery Level: "..tostring(l)
android.makeToast(text)

test run  test run with input  download  show line numbers   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, kmhbujppghqa, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

Comments [hide]

ID Author/Program Comment Date
49 stefan SL4A API reference: https://code.google.com/p/android-scripting/wiki/ApiReference 2015-03-27 20:18:48
48 stefan Works :) (This is for SL4A.)

Just shows "table" instead of a battery level...
2015-03-27 20:18:26

add comment

Snippet ID: #551
Snippet name: Android Battery Test (Lua)
Eternal ID of this version: #551/1
Text MD5: 4d83ed53203cf1f1da1aeda0ac87dc52
Author: stefan
Category:
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-03-27 20:12:47
Source code size: 114 bytes / 5 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 1063 / 166
Referenced in: [show references]