Class Veery

serviceResume()

Let the agent know that an activity has showed up to the user. This will have affect of activating the foreground mode of Veery, which turns the location service to a higher precision and refresh frequency.

This should be called from the onResume callback of the Activity object.

This should not be called on non interactive classes like FirebaseInstanceIdService or FirebaseMessagingService.

Parameters

none

Returns

void

Usage / Example

 import android.location.Location;                  
 import com.roofstreet.android.veery.*;

  public class AnyOtherActivity extends Activity {
     private final Veery veery = new Veery(this);   
     protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        veery.serviceConnect();

        // Required only on Main Activity
        // veery.setApiKeySecret("SuPeRScrET12345789GhJ");
        // FirebaseApp.initializeApp(this);
        // veery.setFirebaseToken(FirebaseInstanceId.getInstance().getToken());
        // veery.activate(Veery.GEOPROFILE);
     }
     @Override
     protected void onResume() {
         super.onResume();
         veery.serviceResume();                     
     }
     @Override
     protected void onPause() {
         super.onPause();
         veery.servicePause();                      
     }
     @Override
     protected void onDestroy() {
         super.onDestroy();
         try {
             veery.serviceDisconnect();             
         } catch (Throwable t) {
         }
     }
 }

User interaction

If the activate() function were called with at least the FOREGROUND Parameter, the user may see the geolocation icon appearing in the Android Task Bar.

Veery Location Icon