|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jcdecaux.jcdroid.system.JCDroidSystem
public class JCDroidSystem
Set of jcdroid system utils. This class simplifies device reboot, locale update, internalsettings wipe, CLI commands execution. If you're gentle enough, it might grind you some coffee.
Method Summary | |
---|---|
void |
displayNavigationBarOverlay()
Displays a navigation bar overlay on screen. |
void |
executeNative(java.lang.String... args)
Executes a command line process |
void |
forceStopPackage(java.lang.String packageName)
Forces package to stop if it's running. |
static JCDroidSystem |
getInstance(android.content.Context context)
Returns a JCDroidSystem singleton. |
java.lang.String |
getMacAddress()
Gets eth0 mac adress with following format XX-XX-XX-XX-XX |
java.lang.String |
getProperty(java.lang.String propName)
Read a system property through getProp() native function |
boolean |
isDeviceConnected()
Test if device is connected (has a valid IP address) on ethernet. |
boolean |
isDeviceEmulator()
Test if current device is an emulator. |
void |
reboot(int delay)
Triggers a reboot in delay ms |
boolean |
requestInternalSettingsUpdate()
Notifies InternalSettings that it should reload its data. |
boolean |
setLocale(java.util.Locale locale)
Change the system locale |
void |
setProperty(java.lang.String name,
java.lang.String value)
Define the value of a system property using setProp function |
void |
shutdown(int delay)
Triggers a poweroff in delay ms |
void |
wipeInternalSettings()
Wipes InternalSettings content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static JCDroidSystem getInstance(android.content.Context context)
JCDroidSystem
singleton.
context
- rather used getApplicationContext()
public boolean requestInternalSettingsUpdate()
public void wipeInternalSettings()
Manifest.permission#MODIFY
permission.
public void reboot(int delay)
delay
- in ms before reboot is triggeredpublic void shutdown(int delay)
delay
- in ms before shutdown is triggeredpublic boolean setLocale(java.util.Locale locale)
locale
-
public void forceStopPackage(java.lang.String packageName)
packageName
- to stop.public java.lang.String getMacAddress()
public boolean isDeviceEmulator()
public boolean isDeviceConnected()
public void displayNavigationBarOverlay()
Manifest.permission#DISPLAY_NAVIGATION_OVERLAY
permission.
public void executeNative(java.lang.String... args)
args
- the command and its arguments. Eg: {"/bin/cp", "file1",
"file2"}public void setProperty(java.lang.String name, java.lang.String value)
name
- of the propertyvalue
- of the propertypublic java.lang.String getProperty(java.lang.String propName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |