com.qualcommlabs.usercontext
Interface ContextCoreConnector

All Superinterfaces:
ConnectorPermissionChangeNotifier, ContextContentNotifier, com.qualcommlabs.usercontext.privateapi.ContextPermissionNotifier

public interface ContextCoreConnector
extends com.qualcommlabs.usercontext.privateapi.ContextPermissionNotifier, ContextContentNotifier, ConnectorPermissionChangeNotifier

The ContextCoreConnector interface provide core API management. All connectors require this connector to be enabled. Other methods allow for the checking of the status of the ContextCoreConnector.


Method Summary
 void checkStatus(StatusCallback statusCallback)
          Deprecated.  
 void deleteAllUserData(Callback<Void> callback)
          Deletes all user data associated with Gimbal including data on the server.
 void enable(android.app.Activity activity, Callback<Void> serviceCallback)
          This is the first method to call once you have acquired ContextConnector Instance.
 ContextCoreStatus getStatus()
          Invoke this method to query the core connector for its current status.
 boolean isPermissionEnabled()
          Invoke this method to see if the core connector has been enabled
 void requestContentHistory(Callback<List<ContentDescriptorHistory>> serviceCallback)
          Returns a list of the content delivered to the device.
 void requestDetailedStatus(ContextConnectorStatusCallback statusCallback)
          Invoke this method to get detailed status of Gimbal.
 void setCurrentActivity(android.app.Activity activity)
          Informs the Gimbal SDK that the app has come into the foreground or gone into the background (by passing a null activity).
 void showUpdatePermissionsUI(android.app.Activity activity, Callback<Void> serviceCallback)
          Invoke this method when you have received a notification that your application has been disabled (permission disabled) by the user and you want to ask your user to turn permissions back on.
 
Methods inherited from interface com.qualcommlabs.usercontext.privateapi.ContextPermissionNotifier
addPermissionChangeListener, removePermissionChangeListener
 
Methods inherited from interface com.qualcommlabs.usercontext.ContextContentNotifier
addContentListener, removeContentListener
 
Methods inherited from interface com.qualcommlabs.usercontext.ConnectorPermissionChangeNotifier
addConnectorPermissionChangeListener, removeConnectorPermissionChangeListener
 

Method Detail

enable

void enable(android.app.Activity activity,
            Callback<Void> serviceCallback)
This is the first method to call once you have acquired ContextConnector Instance. You can also call it when checkStatus call returns a failure.

Parameters:
activity - the activity
serviceCallback - callback to asynchronously receive status and possibly states to manage (success and unexpected failure)

deleteAllUserData

void deleteAllUserData(Callback<Void> callback)
Deletes all user data associated with Gimbal including data on the server.

Parameters:
callback - The success method on the callback is called back after the users data has been successfully purged from teh server and the local device

checkStatus

@Deprecated
void checkStatus(StatusCallback statusCallback)
Deprecated. 

Parameters:
statusCallback - callback to asynchronously receive status and possibly states to manage (success and unexpected failure)
See Also:
Invoke this method to check the status of Gimbal. It's good practice to call this when you are displaying the status of Gimbal or when your application is resumed.

isPermissionEnabled

boolean isPermissionEnabled()
Invoke this method to see if the core connector has been enabled


getStatus

ContextCoreStatus getStatus()
Invoke this method to query the core connector for its current status. This method is typically used after @see isEnabled() is called and has returned false.

Returns:

requestDetailedStatus

void requestDetailedStatus(ContextConnectorStatusCallback statusCallback)
Invoke this method to get detailed status of Gimbal.

Parameters:
statusCallback - the status callback

showUpdatePermissionsUI

void showUpdatePermissionsUI(android.app.Activity activity,
                             Callback<Void> serviceCallback)
Invoke this method when you have received a notification that your application has been disabled (permission disabled) by the user and you want to ask your user to turn permissions back on. Or simply, invoke it when you want to let your user change set the permissions.

Parameters:
activity -
serviceCallback - callback to asynchronously receive status and possibly states to manage

requestContentHistory

void requestContentHistory(Callback<List<ContentDescriptorHistory>> serviceCallback)
Returns a list of the content delivered to the device. Each content descriptor history contains the time stamp of when it was last delivered.

Parameters:
serviceCallback - the service callback

setCurrentActivity

void setCurrentActivity(android.app.Activity activity)
Informs the Gimbal SDK that the app has come into the foreground or gone into the background (by passing a null activity). This improves the timeliness of certain events and is critical to manage background only operations.

Parameters:
activity - (or null if the actifity is being paused)


Copyright © 2014 Qualcomm Retail Solutions, Inc.. All Rights Reserved.