Android 安卓谷歌云
我看过这篇关于谷歌云消息的教程 因此,请一步一步地完成上述教程中的所有内容> 我将文件gcm_server_php上传到我的主机网站 但现在我想知道如何才能得到APY密钥和我的项目编号 这是我做的教程中的一些内容>Android 安卓谷歌云,android,google-cloud-messaging,Android,Google Cloud Messaging,我看过这篇关于谷歌云消息的教程 因此,请一步一步地完成上述教程中的所有内容> 我将文件gcm_server_php上传到我的主机网站 但现在我想知道如何才能得到APY密钥和我的项目编号 这是我做的教程中的一些内容> package com.androidhive.pushnotifications; import android.content.Context; import android.content.Intent; public final class CommonUtilities
package com.androidhive.pushnotifications;
import android.content.Context;
import android.content.Intent;
public final class CommonUtilities {
// give your server registration url here
static final String SERVER_URL = "Server_url";
// Google project id
static final String SENDER_ID = "Sender_ID";
/**
* Tag used on log messages.
*/
static final String TAG = "AndroidHive GCM";
static final String DISPLAY_MESSAGE_ACTION =
"com.androidhive.pushnotifications.DISPLAY_MESSAGE";
static final String EXTRA_MESSAGE = "message";
/**
* Notifies UI to display a message.
* <p>
* This method is defined in the common helper because it's used both by
* the UI and the background service.
*
* @param context application's context.
* @param message message to be displayed.
*/
static void displayMessage(Context context, String message) {
Intent intent = new Intent(DISPLAY_MESSAGE_ACTION);
intent.putExtra(EXTRA_MESSAGE, message);
context.sendBroadcast(intent);
}
}
我不明白什么是服务器\ url>我想这是指我上传文件的网站 检查这个:和
希望这有帮助。先生,您能帮我吗?当我将应用程序发送到手机时,我遇到了新问题,我设置了用户名和电子邮件,但在尝试5次后,错误>无法在演示服务器上注册设备。你用的是哪台服务器?因为,错误表明您尝试通过服务器注册设备超过五次。服务器端有验证。