protected static final java.lang.String SDL_ROUTER_SERVICE_CLASS_NAME
public static final java.lang.String LOCAL_ROUTER_SERVICE_EXTRA
public static final java.lang.String LOCAL_ROUTER_SERVICE_DID_START_OWN
public static final java.lang.String TRANSPORT_GLOBAL_PREFS
public static final java.lang.String IS_TRANSPORT_CONNECTED
public static java.util.Vector runningBluetoothServicePackage
public int getRouterServiceVersion()
public void onReceive(Context context,Intent intent)
This method will set a new UncaughtExceptionHandler for the current thread. The only purpose of the custom UncaughtExceptionHandler is to catch the rare occurrence that the SdlRouterService can't be started fast enough by the system after calling startForegroundService so the onCreate method doesn't get called before the foreground promise timer expires. The new UncaughtExceptionHandler will catch that specific exception and tell the main looper to continue forward. This still leaves the SdlRouterService killed, but prevents an ANR to the app that makes the startForegroundService call.
protected static void setForegroundExceptionHandler()
Attempts to ping a running router service. It does call startForegroundService so it is important to only call this as a ping if the service is already started.
protected static void pingRouterService(Context context,String packageName,String className)
This call will reach out to all SDL related router services to check if they're connected. If a the router service is connected, it will react by pinging all clients. This receiver will then receive that ping and if the router service is trusted, the onSdlEnabled method will be called.
public static void queryForConnectedService(Context context)
If a Router Service is running, this method determines if that service is connected to a device over some form of transport.
public static void requestTransportStatus(Context context,SdlRouterStatusProvider.ConnectedStatusCallback callback)
public static android.content.ComponentName consumeQueuedRouterService()
We need to define this for local copy of the Sdl Router Service class. It will be the main point of connection for Sdl enabled apps
public abstract java.lang.Class defineLocalSdlRouterClass()
The developer will need to define exactly what should happen when Sdl is enabled. This method will only get called when a Sdl session is initiated.
The most useful code here would be to start the activity or service that handles most of the Livio Connect code.
public abstract void onSdlEnabled(Context context,Intent intent)
|android.content.BroadcastReceiver||onReceive, goAsync, peekService, setResultCode, getResultCode, setResultData, getResultData, setResultExtras, getResultExtras, setResult, getAbortBroadcast, abortBroadcast, clearAbortBroadcast, isOrderedBroadcast, isInitialStickyBroadcast, setOrderedHint, setDebugUnregister, getDebugUnregister|
|java.lang.Object||getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize|