GOOGLE登入
第八步:宣告
GoogleSignInClient mgoogleSignInClient;
int RC_SIGN_IN;
第九步:在程序新增以下代码(可放在按钮事件里)
GoogleSignInOptions gso=new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
.requestEmail()
.build();
mgoogleSignInClient = GoogleSignIn.getClient(this,gso);
Intent signInIntent =mgoogleSignInClient.getSignInIntent();
startActivityForResult(signInIntent,RC_SIGN_IN);
```
第十步:在onActivityResult写下
if(requestCode==RC_SIGN_IN){
Tasktask=GoogleSignIn.getSignedInAccountFromIntent(data);
handleSignInResult(task);
}
}
第十一步:添加一个funtion
private void handleSignInResult(TaskcompletedTask){
try{
GoogleSignInAccount account=completedTask.getResult(ApiException.class);
} catch (ApiException e) {
e.printStackTrace();
}
}
虽然有点突然,但是我今天想来谈谈 container。对於大部分的人来说,讲到 container ...
终於写道flow的最後一篇了 尽管我们在自己的开发上,能够高兴地写coroutine和suspend...
今日题目:48. Rotate Image You are given an n x n 2D ma...
在Day3 Pipeline 如何做版本控制 - NiFi Registry就有提到 NiFi Re...
tags: 铁人赛 AWS Outposts network 前情提要 昨天将 AWS 的网路配置好...