public class AndroidContextService extends BasicService implements AndroidContextManager.AndroidContextChangeListener
IContextService.
Provides Access to the Android Application Context and Android Resources such
as Files and Properties| Constructor and Description |
|---|
AndroidContextService(IComponentIdentifier provider)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
<any> |
dispatchEvent(IJadexAndroidEvent event)
Dispatches an Event to the Android UI / Activity.
|
<any> |
getFile(java.lang.String name)
Returns a File
|
<any> |
getNetworkIps()
Queries the Android Wifimanager for DHCP Infos and returns the assigned
IP Address, if any.
|
<any> |
getSharedPreferences(java.lang.String name)
Gets an Android Shared Preference Container.
|
void |
onContextCreate(android.content.Context ctx)
Called when an Android Context is created
|
void |
onContextDestroy(android.content.Context ctx)
Called when an Android Context is destroyed
|
<any> |
openFile(java.lang.String path)
Starts an intent to open the given file.
|
<any> |
shutdownService() |
<any> |
startService() |
public AndroidContextService(IComponentIdentifier provider)
provider - public <any> startService()
public <any> shutdownService()
public void onContextDestroy(android.content.Context ctx)
AndroidContextManager.AndroidContextChangeListeneronContextDestroy in interface AndroidContextManager.AndroidContextChangeListenerpublic void onContextCreate(android.content.Context ctx)
AndroidContextManager.AndroidContextChangeListeneronContextCreate in interface AndroidContextManager.AndroidContextChangeListenerpublic <any> getFile(java.lang.String name)
name - File nameFilepublic <any> getSharedPreferences(java.lang.String name)
preferenceFileName - public <any> dispatchEvent(IJadexAndroidEvent event)
event - IJadexAndroidEventpublic <any> getNetworkIps()
public <any> openFile(java.lang.String path)
throws java.io.IOException
path - java.io.IOException