Initializing the SDK

You need to have an instance of the FootmarksAPI class to interact with the ExtremeLocation SDK. It is obtained by calling a static method to initialize the SDK.

mFootmarksAPI = FootmarksAPI.init(context, APP_KEY, APP_SECRET, new
	FootmarksAPI.InitCallback() {    
	@Override    
	public void onError(FootmarksSdkError footmarksSdkError) {        
		Log.w(TAG, String.format("Error %1$s: %2$s",
		footmarksSdkError.getError().toString(), footmarksSdkError.getMessage()));        
			switch (footmarksSdkError.getError()) {                
				// You can do different actions depending on error type            
				case LOCATION_PERMISSION_NOT_ENABLED:               
				break;            
				case BLUETOOTH_NOT_ON:                
				break;            
				case BLE_NOT_SUPPORTED:                
				break;            
				case APPKEY_MISSING:                
				break;            
				case APPSECRET_MISSING:                
				break;            
				case LOGIN_ERROR:                
				break;        
			}    
		}    
	@Override    
	public void onSuccess() {
		// API is initialized");
            // This is a good place to call startScan
          } 
}); 
Note

Note

APP_KEY and APP_SECRET can be obtained from https://manage.extremelocation.com. If initialization fails, the onError callback will be called with error information and type. If the call succeeds, onSuccess will be called. The FootmarksAPI instance can then be used to start and stop scanning and to set callbacks for beacon and location related events.