1
我看到本教程的谷歌雲消息here谷歌Android雲
所以不要在上面的教程步驟中的所有事情一步>
我上傳文件gcm_server_php到我的主機的網站。
但現在我想知道如何獲得APY Key和我的項目編號?
這是從教程成才我>
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);
}
}
我不明白什麼是平均SERVER_URL>我想這意味着我的網站,我上傳的文件?
ohh,thank dera .. – user3020391
好的我親愛的/ .... – user3020391
先生你能幫我嗎我有新問題,當我發送應用程序到我的手機,我設置用戶名和電子郵件,但錯誤>無法註冊設備上演示服務器5次嘗試後。最新錯誤 – user3020391