簡體   English   中英

推送通知未顯示在設備中

[英]Push Notification is not displayed in device

我正在開發一個Android項目。 在我的項目中,我必須實現push notification 我遵循了androidhive的教程

項目正在正常運行。 但是,當我嘗試從本地服務器向設備發送消息時,沒有收到任何通知。

registerid在db和GCMregister是相同的......沒什么發送消息時發生的事情...是服務器端的問題?

我測試了幾個仿真器。

請幫助我解決我的問題。

 Need to check:
--Check your registration id is stored in your database or not?And you are using same id or not?
--on client side ,check whether it is register in GCMRegistrar **isRegisteredOnServer()**?
--During sending message chck 
 --'Authorization: key=' . GOOGLE_API_KEY, //specify server or browser key obtained from google console.
 --Proper registration Id

另請檢查您具有Google帳戶的設備,以確保您必須執行以下步驟:

  1. 轉到設置菜單->帳戶和同步->添加帳戶-> google->下一步->創建帳戶或登錄->完成。

那么您可以正確執行您的應用程序。

現在,在查看所有注釋后僅剩一件事了,請檢查您的php代碼,因為當我那時第一次在Google api鍵和數據庫名稱和密碼中學習時遇到了一些問題,請檢查一下。

創建一個新的AVD並選擇任何GoogleAPI作為目標

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM