Parse Push Notification not work on android

后端 未结 4 1355
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 07:09

I am using parse push notification for my android app. I follow tutorial and i downlaod jar file and than import it into my project and i have added this code into my manife

相关标签:
4条回答
  • 2021-01-01 07:21

    parse api sometimes lags for push message delivery for android... i got push notification when i signed my apk.. try it again with signed apk.

    0 讨论(0)
  • 2021-01-01 07:24

    The parse notifier uses port number 8253. If it is blocked in your network the notification will not be received!!! So try some other internet connection ...this is how i solved this problem!

    0 讨论(0)
  • 2021-01-01 07:33

    add this into your delegate or activity on onCreate

    ParsePush.subscribeInBackground("[channel name]", new SaveCallback() {
              @Override
              public void done(ParseException e) {
                if (e == null) {
                  Log.d("com.parse.push", "successfully subscribed to the broadcast channel.");
                } else {
                  Log.e("com.parse.push", "failed to subscribe for push", e);
                }
              }
            });
    
    0 讨论(0)
  • 2021-01-01 07:38

    there should be 2 receiver tags. other one should be something like this

    <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: If you change the package name of this sample app,
                      change "com.parse.tutorials.pushnotifications" in the lines
                      below to match the new package name.
                    -->
                    <category android:name="com.example.ifis" />
                </intent-filter>
            </receiver>
    
    0 讨论(0)
提交回复
热议问题