Class Veery
serviceDisconnect()
Disconnect an activity from the Veery Agent. This should be called from the onDestroy 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
none