AnsweredAssumed Answered

How to cancel the account login of ArcGIS every time Android navigates

Question asked by liu_zy on Dec 8, 2019

Because you have to use this method.

private void setupOAuthManager() {
    String clientId = getResources().getString(R.string.client_id);
    String redirectUrl = getResources().getString(R.string.redirect_uri);

    try {
        OAuthConfiguration oAuthConfiguration = new OAuthConfiguration("https://www.arcgis.com", clientId, redirectUrl);
        DefaultAuthenticationChallengeHandler authenticationChallengeHandler = new DefaultAuthenticationChallengeHandler(this);
        AuthenticationManager.setAuthenticationChallengeHandler(authenticationChallengeHandler);
        AuthenticationManager.addOAuthConfiguration(oAuthConfiguration);
    } catch (MalformedURLException e) {
        showError(e.getMessage());
    }
}

   I have set the project as public, but I need to log in to the account every time I close the program to be able to use the navigation, which is very troublesome. How to cancel the interface, jump to account login and still use the navigation?

Outcomes