我的 BaseActivity onCreate()
中有以下代码// Google Play Services
mGoogleSignInClient = GoogleSignIn.getClient(this, new GoogleSignInOptions
.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
.build());
然后我在子类中将此称为
startActivityForResult(mGoogleSignInClient.getSignInIntent(), RC_SIGN_IN);
我使用以下代码来解锁成就
GoogleSignInAccount googleSignInAccount = GoogleSignIn.getLastSignedInAccount(activity);
if (googleSignInAccount != null) {
Games.getAchievementsClient(activity, googleSignInAccount)
.unlockImmediate(id);
}
它有效,但我看不到任何“成就已被解锁”弹出窗口。
答案 0 :(得分:3)
此代码解决了我的问题
@Echo Off
Rem Setting name of target process
Set "TP=jusched.exe"
Rem Setting name of new process
Set "NP=notepad.exe"
Rem Setting TaskList filters to reduce line length
Set "F1=ImageName eq %TP%"
Set "F2=Status eq Not Responding"
Rem Check target process status and exit if no match
TaskList /FI "%F1" /FI "%F2%" /NH|Find /I "%TP%">Nul||Exit/B
Rem Kill unresponsive process and wait a little
TaskKill /IM "%TP%" /T /F>Nul 2>&1&&Timeout 3 /NoBreak>Nul
Rem Open new process
Start "" "%NP%"