Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced deprecated Google Drive Android API #59

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import com.google.android.gms.auth.api.Auth
import com.google.android.gms.auth.api.signin.GoogleSignIn
import com.google.android.gms.auth.api.signin.GoogleSignInClient
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
import com.google.android.gms.drive.Drive
import com.google.android.gms.common.Scopes
import com.google.android.gms.common.api.Scope
import com.google.android.gms.games.SnapshotsClient
import com.google.android.gms.games.snapshot.SnapshotMetadata
import io.cgisca.godot.gpgs.accountinfo.PlayerInfoController
Expand Down Expand Up @@ -176,7 +177,7 @@ class PlayGameServicesGodot(godot: Godot) : GodotPlugin(godot), AchievementsList
this.saveGameName = saveGameName
val signInOptions = if (enableSaveGamesFunctionality) {
val signInOptionsBuilder = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
signInOptionsBuilder.requestScopes(Drive.SCOPE_APPFOLDER).requestId()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.requestId() should still be there though?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason if .requestId() is left there, it'll also cause the sign-in to get stuck.

signInOptionsBuilder.requestScopes(Scope(Scopes.DRIVE_APPFOLDER))
signInOptionsBuilder.build()
} else {
GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN
Expand Down