Skip to content

Instantly share code, notes, and snippets.

@marcoonroad
Created January 28, 2014 02:32
Show Gist options
  • Save marcoonroad/8661380 to your computer and use it in GitHub Desktop.
Save marcoonroad/8661380 to your computer and use it in GitHub Desktop.
Tenha alguns Environment e status do Android (Requer: SL4A + BeanShell interpreter).
source("/sdcard/com.googlecode.bshforandroid/extras/bsh/android.bsh");
droid = Android();
env = droid.call("environment").get("result");
tz = env.get("TZ");
sd = env.get("sdcard");
print("=== General infos ======================");
print("Download path : " + env.get("download"));
print("Cache path : " + env.get("appcache"));
print("SDK Version : " + env.get("SDK") + "\n");
print("=== Timezone Infos =====================");
print("ID : " + tz.get("id"));
print("Locality : " + tz.get("display"));
print("Offset UTC : " + (tz.get("offset")/1000)/3600 + " Horas\n");
print("=== SDCard Info ========================");
print("Available blocks : " + sd.get("availblocks"));
print("Total blocks : " + sd.get("blockcount"));
print("Size of block : " + sd.get("blocksize"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment