public class Process
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Process.EventListener
Clients must subclass an EventListener to get state change information from the
node.js process
|
static class |
Process.UninstallScope
Determines the scope of an uninstallation.
|
Modifier and Type | Field and Description |
---|---|
static int |
kContextFinalizedButProcessStillActive |
static int |
kMediaAccessPermissionsNone |
static int |
kMediaAccessPermissionsRead |
static int |
kMediaAccessPermissionsRW |
static int |
kMediaAccessPermissionsWrite |
Constructor and Description |
---|
Process(android.content.Context androidContext,
java.lang.String uniqueID,
int mediaAccessMask,
Process.EventListener listener)
Creates a node.js process and attaches an event listener
|
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(Process.EventListener listener)
Adds an EventListener to this Process
|
void |
exit(int exitc)
Instructs the VM to halt execution as quickly as possible
|
boolean |
isActive()
Determines if the process is currently active.
|
void |
keepAlive()
Instructs the VM not to shutdown the process when no more callbacks are pending.
|
void |
letDie()
Instructs the VM to not keep itself alive if no more callbacks are pending.
|
void |
removeEventListener(Process.EventListener listener)
Removes a listener from this Process
|
static void |
uninstall(android.content.Context ctx,
java.lang.String uniqueID,
Process.UninstallScope scope)
Uninstalls a given process class identified by its uniqueID
|
public static final int kContextFinalizedButProcessStillActive
public static final int kMediaAccessPermissionsNone
public static final int kMediaAccessPermissionsRead
public static final int kMediaAccessPermissionsWrite
public static final int kMediaAccessPermissionsRW
public Process(android.content.Context androidContext, java.lang.String uniqueID, int mediaAccessMask, Process.EventListener listener)
listener
- the listener interface objectpublic void addEventListener(Process.EventListener listener)
listener
- the listener interface objectpublic void removeEventListener(Process.EventListener listener)
listener
- the listener interface object to removepublic boolean isActive()
public void exit(int exitc)
exitc
- The exit codepublic void keepAlive()
public void letDie()
public static void uninstall(android.content.Context ctx, java.lang.String uniqueID, Process.UninstallScope scope)
ctx
- The Android contextuniqueID
- The id of the process classscope
- scope in which to uninstall the process class