public class AndroidContextService extends jadex.bridge.service.BasicService implements AndroidContextManager.AndroidContextChangeListener, jadex.bridge.service.types.context.IContextService
IContextService.
Provides Access to the Android Application Context and Android Resources such
as Files and Properties| Constructor and Description |
|---|
AndroidContextService(jadex.bridge.IComponentIdentifier provider)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
jadex.commons.future.IFuture<java.lang.Boolean> |
dispatchEvent(jadex.bridge.service.types.context.IJadexAndroidEvent event)
Dispatches an Event to the Android UI / Activity.
|
jadex.commons.future.IFuture<java.io.File> |
getFile(java.lang.String name)
Returns a File
|
jadex.commons.future.IFuture<java.util.List<java.net.InetAddress>> |
getNetworkIps()
Queries the Android Wifimanager for DHCP Infos and returns the assigned
IP Address, if any.
|
jadex.commons.future.IFuture<jadex.bridge.service.types.context.IPreferences> |
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
|
jadex.commons.future.IFuture<java.lang.Void> |
openFile(java.lang.String path)
Starts an intent to open the given file.
|
jadex.commons.future.IFuture<java.lang.Void> |
shutdownService() |
jadex.commons.future.IFuture<java.lang.Void> |
startService() |
createServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getInterfaceType, getInternalAccess, getMethodTimeout, getPropertyMap, getProviderId, getServiceIdentifier, hashCode, initNFProperties, isValid, setComponentAccess, setPropertyMap, toStringpublic AndroidContextService(jadex.bridge.IComponentIdentifier provider)
provider - public jadex.commons.future.IFuture<java.lang.Void> startService()
startService in interface jadex.bridge.service.IInternalServicestartService in class jadex.bridge.service.BasicServicepublic jadex.commons.future.IFuture<java.lang.Void> shutdownService()
shutdownService in interface jadex.bridge.service.IInternalServiceshutdownService in class jadex.bridge.service.BasicServicepublic void onContextDestroy(android.content.Context ctx)
AndroidContextManager.AndroidContextChangeListeneronContextDestroy in interface AndroidContextManager.AndroidContextChangeListenerpublic void onContextCreate(android.content.Context ctx)
AndroidContextManager.AndroidContextChangeListeneronContextCreate in interface AndroidContextManager.AndroidContextChangeListenerpublic jadex.commons.future.IFuture<java.io.File> getFile(java.lang.String name)
getFile in interface jadex.bridge.service.types.context.IContextServicename - File nameFilepublic jadex.commons.future.IFuture<jadex.bridge.service.types.context.IPreferences> getSharedPreferences(java.lang.String name)
getSharedPreferences in interface jadex.bridge.service.types.context.IContextServicepreferenceFileName - public jadex.commons.future.IFuture<java.lang.Boolean> dispatchEvent(jadex.bridge.service.types.context.IJadexAndroidEvent event)
dispatchEvent in interface jadex.bridge.service.types.context.IContextServiceevent - IJadexAndroidEventpublic jadex.commons.future.IFuture<java.util.List<java.net.InetAddress>> getNetworkIps()
getNetworkIps in interface jadex.bridge.service.types.context.IContextServicepublic jadex.commons.future.IFuture<java.lang.Void> openFile(java.lang.String path)
throws java.io.IOException
openFile in interface jadex.bridge.service.types.context.IContextServicepath - java.io.IOException