Code example for FragmentActivity

Methods: getApplication, startActivityForResult

0
    @Override 
    public void onProviderDisabled(String provider) {
    } 
 
    private void startPickPlaceActivity(Location location) {
        PlacePickerApplication application = (PlacePickerApplication) getApplication();
        application.setSelectedPlace(null);
 
        Intent intent = new Intent(this, PickPlaceActivity.class);
        PickPlaceActivity.populateParameters(intent, location, null);
 
        startActivityForResult(intent, PLACE_ACTIVITY);
    } 
 
    private void onClickSeattle() { 
        try { 
            startPickPlaceActivity(SEATTLE_LOCATION);
        } catch (Exception ex) {
            onError(ex);
        } 
    }