2014-10-02 142 views
-1

這讓我非常瘋狂。我是Android開發的新手,但在iOS開發方面經驗豐富。我想要實現解析推送通知到的Android應用程序,一切是怎麼回事罰款:Android推送通知沒有收到

  • 該器件在分析
  • 註冊發送時所收到的信息測試Push消息的解析系統告訴我

但是:我的Android測試設備上沒有收到任何東西。

我已經創造了新的解析應用程序和Android Studio項目,但沒有任何運氣。任何幫助調試這個或這是一個Android工作室相關的問題?

編輯:我只是跟着推送服務的快速指南,所以我加了一些線路的清單,並將此我的代碼

protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     setContentView(R.layout.activity_inlog); 
     Parse.initialize(this, "xxx", "xxx"); 
     ParseFacebookUtils.initialize("1515015192073818"); 
     ParseInstallation.getCurrentInstallation().saveInBackground(); 

清單:

<receiver android:name="com.parse.GcmBroadcastReceiver" 
      android:permission="com.google.android.c2dm.permission.SEND"> 
      <intent-filter> 
       <action android:name="com.google.android.c2dm.intent.RECEIVE" /> 
       <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> 

       <!-- 
        IMPORTANT: Change "com.parse.starter" to match your app's package name. 
       --> 
       <category android:name="com.pootentieel.andrew.sbpootentieel" /> 
      </intent-filter> 
     </receiver> 
+0

你能在這裏展示您的GCMIntentService類.. – Ranjit 2014-10-02 13:25:42

回答

-1

你有沒有改變com.parse .starter來匹配你的包名,並讓你註冊推回調接收器活動?編輯: 轉到此鏈接github.com/ParsePlatform/PushTutorial並導入android項目並更改密鑰。然後運行android項目併發送推送,看看它是否工作。如果有效,請檢查兩個項目並排查看造成問題的原因。請註明這個答案是正確的,如果它幫助謝謝:)

+0

是的,我做到了,我複查快速入門指南一些時間。 – 2014-10-02 13:32:53

+0

轉到此鏈接https://github.com/ParsePlatform/PushTutorial並導入android項目並更改密鑰。然後運行android項目併發送推送,看看它是否工作。如果有效,請檢查兩個項目並排查看造成問題的原因。請標記此答案爲正確的,如果它幫助謝謝:) – 2014-10-02 13:37:28

+0

這不是一個答案,因爲它提出了一個問題。它應該是一個評論。 – NickT 2014-10-02 13:50:23