com.gtosoft.libvoyager.android
Class ActivityHelper
java.lang.Object
com.gtosoft.libvoyager.android.ActivityHelper
public class ActivityHelper
- extends java.lang.Object
This class will contain useful things that are helpful to users of
Activities. This might be for example the ability to perform a BT discovery
and connect to the first discovered device.
Basic use:
1. Register your "found elm device" callback: aHelper.registerChosenDeviceCallback(chosenCallback);
2. aHelper.startDiscovering();
3. Expect to get a call to your chosenCallback EventCallback. It will pass you the MAC of the chosen device.
- Author:
- Brad Hein - GTOSoft LLC
Constructor Summary |
ActivityHelper(Context ctxOfActivity)
Default constructor - obtain context of the parent activity. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActivityHelper
public ActivityHelper(Context ctxOfActivity)
- Default constructor - obtain context of the parent activity.
- Parameters:
c
-
startDiscovering
public void startDiscovering()
shutdown
public void shutdown()
registerChosenDeviceCallback
public void registerChosenDeviceCallback(EventCallback chosenCallback)
- Call this to register an eventcallback with onELMDeviceChosen overridden with your code.
- Parameters:
chosenCallback
-