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 Option 1 - GSAppState.Background (OR) GSAppState.Foreground (OR) GSAppState.Terminated
Option 2 - GSAppState.AlwaysOn

TrackLocationInMotion

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

                                
  GeoSpark.trackLocationInMotion([SETTINGS])
  [GeoSpark trackLocationInMotion:@[SETTINGS]];       
                               
                               
                            
Parameter Description
SETTINGS Option 1 - GSMotion.Stationary (OR) GSMotion.Running (OR) GSMotion.Walking (OR) GSMotion.AutoMotive
Option 2 - GSMotion.All

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 Option 1 - GeoSpark.Type.FOREGROUND (OR) GeoSpark.Type.BACKGROUND (OR) GeoSpark.Type.TERMINATED
Option 2 - 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 Option 1 -GeoSpark.Type.STOP (OR) GeoSpark.Type.WALK (OR) GeoSpark.Type.RUNNING (OR) GeoSpark.Type.BICYCLE (OR) GeoSpark.Type.DRIVE
Option 2 - GeoSpark.Type.ALL