SDK Level Configuration

iOS

TrackLocationInAppState

Using the trackLocationInAppState method , one can configure the SDK settings for enabling location tracking during given app states.

                                
  GeoSpark.trackLocationInAppState([SETTINGS])
  [GeoSpark trackLocationInAppState:@[SETTINGS]];       
                               
                            
Parameter Description
SETTINGS GSAppState.AlwaysOn,GSAppState.Background ,GSAppState.Foreground,GSAppState.Terminated

TrackLocationInMotion

Using the trackLocationInMotion method , one can configure the SDK settings for enabling motion tracking.

                                
  GeoSpark.trackLocationInMotion([SETTINGS])
  [GeoSpark trackLocationInMotion:@[SETTINGS]];       
                               
                            
Parameter Description
SETTINGS GSMotion.All, GSMotion.Stationary, GSMotion.Running, GSMotion.Walking,GSMotion.AutoMotive

setLocationAccuracy

Using the setLocationAccuracy method , one can set location tracking with accuracy (5 to 100 meters).

                                
  GeoSpark.setLocationAccuracy(accuracy)
  [GeoSpark setLocationAccuracy:accuracy];       
                               
                            

Android

Notify GeoSpark SDK with Application States

Call this method to inform GeoSpark SDK when the app resumes, pauses and terminated.

Text

                                
                                  
  @Override
     protected void onResume() {
     super.onResume();
     ...
     GeoSpark.onResume(this);
     ...
     }
     @Override
     protected void onPause() {
     super.onPause();
     ...
     GeoSpark.onPause(this);
     ...
     }
     @Override
     protected void onDestroy() {
     super.onDestroy();
     ...
     GeoSpark.onDestroy(this);
     ...
   }     
                                 
                               
                            

setTrackingInAppState

Call this method to configure GeoSpark SDK settings for enabling location tracking during given app states.

Text

                                
                                  
GeoSpark.setTrackingInAppState(context, new GeoSpark.Type[]{Settings}); 
                                    
                               
                            
Parameter Description
SETTINGS GeoSpark.Type.FOREGROUND, GeoSpark.Type.BACKGROUND, GeoSpark.Type.TERMINATED, GeoSpark.Type.ALWAYS_ON

setTrackingInMotion

Call this method to configure GeoSpark SDK settings for enabling location tracking during given motion tracking.

Text

                                
                                  
  GeoSpark.setTrackingInMotion(context, new GeoSpark.Type[]{Settings});  
                                
                               
                            
Parameter Description
SETTINGS GeoSpark.Type.ALL, GeoSpark.Type.STOP, GeoSpark.Type.WALK, GeoSpark.Type.RUNNING, GeoSpark.Type.BICYCLE, GeoSpark.Type.DRIVE