GetJedi/app/src/main/java/edu/getjedi/frontend/mobile/MainMapActivity.java
@Override
    protected void onStart(){
        super.onStart();
        appContext = AppContext.getInstanceOf(this);
        if(memory.hasFile()){
            appContext.setUser(memory.load());
        }
        appContext.performAction(null);
        if (!hasLocationAndInternetPermissions()) {
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.INTERNET}, 10);
        }else {
            initializeSensorsAccess();
        }
    }
/**
     * When the application starts or returns from background.
     */
When the application starts or returns from background.
When the application starts or returns from background .
@Override
    protected void onStart(){
        super.onStart();
        appContext = AppContext.getInstanceOf(this);
        if(memory.hasFile()){
            appContext.setUser(memory.load());
        }
        appContext.performAction(null);
        if (!hasLocationAndInternetPermissions()) {
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.INTERNET}, 10);
        }else {
            initializeSensorsAccess();
        }
    }
@ Override protected void onStart ( ) { super . onStart ( ) ; appContext = AppContext . getInstanceOf ( this ) ; if ( memory . hasFile ( ) ) { appContext . setUser ( memory . load ( ) ) ; } appContext . performAction ( null ) ; if ( ! hasLocationAndInternetPermissions ( ) ) { ActivityCompat . requestPermissions ( this , new String [ ] { Manifest . permission . ACCESS_FINE_LOCATION , Manifest . permission . ACCESS_COARSE_LOCATION , Manifest . permission . INTERNET } , 10 ) ; } else { initializeSensorsAccess ( ) ; } }
When the application starts or returns from background.
When the application starts or returns from background .