我正在努力Google OAuth 2.0获取有关登录用户的信息Google OAuth 2.0.有各种各样的范围可供选择
为了获得用户基本配置文件,可以调用OAuth范围profile,该范围在内部转换为URL,https://www.googleapis.com/auth/plus.profile并且为了知道登录用户的电子邮件ID,有一个Oauth范围被调用email,从而产生URL https://www.googleapis.com/auth/userinfo.email.
现在我的问题是:如何获取用户的Gmail帐户的创建日期?
是否有任何OAuth范围可用于获取登录用户的gmail帐户的年龄?
I have made an app in android studio and a game in Unity. Now I want to combint these two together. Starting is no problem in android calling the unityNativePlayer. But when I want to go back from the unity activity to the MainActivity.java it comes to this: I have an exit button in the unity game calling Application.exit(); and nothing happens when I press the button. Is there a mistake?
我用Java创建了我的第一个游戏--Snake,它的主循环看起来像这样
while (true)
{
long start = System.nanoTime();
model.eUpdate();
if (model.hasElapsedCycle())
{
model.updateGame();
}
view.refresh();
long delta = (System.nanoTime() - start) / 1000000L;
if (delta < model.getFrameTime())
{
try
{
Thread.sleep(model.getFrameTime() - delta);
} catch (Exception e)
{
e.printStackTrace();
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是在我的项目的要求中有一个响应点,所以我需要改变Thread.sleep()其他东西,但我不知道如何以一种简单的方式做到这一点.提前感谢任何建议.
我必须用每个循环的前10个倍数填充一个ArrayList.我真的似乎无法弄清楚我怎么也不能使用任何其他循环.
这是我的代码无效.
ArrayList<Integer> arraylist = new ArrayList<Integer>(10);
for (Integer y : arraylist) {
arraylist.add( (2+(y*2)));
}
Run Code Online (Sandbox Code Playgroud) if (key != (VK_RIGHT || VK_DOWN)) //in this line bluej saying that's not correctly written. i want when the user is not pressing the down or up arrow it makes the error sound.
{
playSound("error");
}
Run Code Online (Sandbox Code Playgroud)
我想当用户没有按下向下或向上箭头时,它会使错误发出声音.但是在bluej中它向我显示了|| 不管用.