小编Ema*_*raf的帖子

如何在Google OAuth 2中获取Gmail帐户的创建日期

我正在努力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帐户的年龄?

oauth-2.0 google-oauth

8
推荐指数
1
解决办法
1771
查看次数

Return from unity activity to MainActivity in android studio

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?

c# java android unity-game-engine android-studio

5
推荐指数
1
解决办法
2575
查看次数

Java蛇游戏避免使用Thread.sleep

我用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()其他东西,但我不知道如何以一种简单的方式做到这一点.提前感谢任何建议.

java multithreading responsiveness

5
推荐指数
1
解决办法
531
查看次数

如何为每个循环填写一个ArrayList?(JAVA)

我必须用每个循环的前10个倍数填充一个ArrayList.我真的似乎无法弄清楚我怎么也不能使用任何其他循环.

这是我的代码无效.

   ArrayList<Integer> arraylist = new ArrayList<Integer>(10);  
   for (Integer y : arraylist) {
         arraylist.add( (2+(y*2)));      
   }
Run Code Online (Sandbox Code Playgroud)

java

3
推荐指数
2
解决办法
9988
查看次数

OR组合器在Java IF语句中不起作用

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中它向我显示了|| 不管用.

java if-statement

1
推荐指数
1
解决办法
65
查看次数