简体   繁体   中英

How to remove the “Have offline access” permission on Android using oAuth

I need to remove the “Have offline access” permission on my Android app.

In my application, when I click in sign me with Google it is showing me this:

在此处输入图片说明

I don't want that message

I'm using "GoogleApiClient" like this for the initialization:

// Build GoogleApiClient with access to basic profile
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .addApi(Plus.API)
                .addScope(Plus.SCOPE_PLUS_LOGIN)
                .addScope(Plus.SCOPE_PLUS_PROFILE)
                .build();

I search over internet, but I can't found how to do that in Android. I only found information about Web Server Applications and the approval_prompt parameter.

Someone have any idea of how to do that on Android?

Thanks and sorry for my poor English

That is the scope of permissions your application is requesting. Users need to know what permissions you want to access If you want to remove that you will have to remove

.addScope(Plus.SCOPE_PLUS_LOGIN)
.addScope(Plus.SCOPE_PLUS_PROFILE)

But then you will not be able to access the users account either.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM