public class I2PAndroidHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
REQUEST_START_I2P |
static java.lang.String |
URI_I2P_ANDROID |
static java.lang.String |
URI_I2P_ANDROID_DONATE |
static java.lang.String |
URI_I2P_ANDROID_LEGACY |
| Constructor and Description |
|---|
I2PAndroidHelper(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind()
Try to bind to I2P Android.
|
boolean |
bind(android.content.ServiceConnection serviceConnection,
int flags)
Try to bind to I2P Android, using the provided ServiceConnection and
flags.
|
boolean |
isI2PAndroidInstalled()
Check if I2P Android is installed.
|
boolean |
isI2PAndroidRunning()
Check if I2P Android is running.
|
void |
promptToInstall(android.app.Activity activity)
Show dialog - install I2P Android from market or F-Droid.
|
void |
requestI2PAndroidStart(android.app.Activity activity)
Show dialog - request that I2P Android be started.
|
void |
unbind()
Unbind from I2P Android.
|
public static final java.lang.String URI_I2P_ANDROID
public static final java.lang.String URI_I2P_ANDROID_DONATE
public static final java.lang.String URI_I2P_ANDROID_LEGACY
public static final int REQUEST_START_I2P
public void bind()
Activity.onStart().public boolean bind(android.content.ServiceConnection serviceConnection,
int flags)
Service.onStartCommand(android.content.Intent, int, int).
The ServiceConnection will be provided with an IBinder
that can be converted to an
net.i2p.android.router.service.IRouterState with
IRouterState.Stub.asInterface(IBinder).public void unbind()
Activity.onStop().public boolean isI2PAndroidInstalled()
public void promptToInstall(android.app.Activity activity)
activity - the Activity this method has been called from.public boolean isI2PAndroidRunning()
bind()
has not been called previously, this will always return false.public void requestI2PAndroidStart(android.app.Activity activity)
activity - the Activity this method has been called from.