无法从Parse.com发送推送 [英] Can't send push from Parse.com

查看:92
本文介绍了无法从Parse.com发送推送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中有一个带有Parse的项目,但是我更改了该项目(因此更改了按键),并且没有从Parse发送推(测试或正常).

I had a project with Parse in my app, but I've changed the project (and so the keys) and my pushes (test or normal) doesn't get sent from Parse.

当我尝试发送给他们时,我收到通知,它将由2个收件人接收:

When I try to send them I'm notified that it's going to be received by 2 recipients:

我的客户"推送已启用:

My Client push is ENABLED:

尽管我认为不需要,但我已经获得了GCM证书:

Although I think it's not needed, I've got my GCM credentials:

  • 我尝试使用在Android上扩展的自定义ParsePushBroadcastReceiver并记录onReceive
  • 我尝试过签名并进行调试.
  • 我已经尝试过Wi-Fi,3G和4G.
  • 我试图清除数据,卸载应用程序,然后重新启动.
  • I've tried with a custom ParsePushBroadcastReceiver extended on Android and logging onReceive
  • I've tried to sign as release and debug.
  • I've tried with Wi-Fi, 3G and 4G.
  • I've tried to clear data, uninstall the app, rebooting.

我对AndroidManifest.xml的权限为:

My permissions on AndroidManifest.xml are:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<permission android:protectionLevel="signature"
    android:name="taggie.me.permission.C2D_MESSAGE" />
<uses-permission android:name="taggie.me.permission.C2D_MESSAGE" />

我的应用程序是:

<application
    android:name=".MainApplication"
    android:allowBackup="true"
    android:icon="@drawable/logo_help"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

其中的代码是:

public class MainApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        Parse.initialize(this, "YBi4ki505TcwKSNEIW7gkFCdWvjHC9yNJmrZHBGR", "APwUw3laazYRhvkSRwZZqpxsROUjH5jWP6QzeHiq");
        ParseInstallation.getCurrentInstallation().saveInBackground();
    }
}

其余的我的AndroidManifest.xml是:

and the rest of my AndroidManifest.xml is:

    <service android:name="com.parse.PushService" />
    <receiver android:name="com.parse.ParseBroadcastReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <action android:name="android.intent.action.USER_PRESENT" />
        </intent-filter>
    </receiver>
    <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" />

            <category android:name="taggie.me" />
        </intent-filter>
    </receiver>
    <receiver android:name="com.parse.ParsePushBroadcastReceiver" android:exported="false">
        <intent-filter>
            <action android:name="com.parse.push.intent.RECEIVE" />
            <action android:name="com.parse.push.intent.DELETE" />
            <action android:name="com.parse.push.intent.OPEN" />
        </intent-filter>
    </receiver>

    <meta-data android:name="com.parse.push.gcm_sender_id"
        android:value="id:10321_and_the_rest_of_my_number" />; 

但是问题在这里

我没有收到通知,当我发送通知时,我可以看到以下内容:

I don't get notifications, and when I send them I can see this:

有人在开枪自杀之前有任何线索吗?谢谢:)

Does anyone has a clue before shooting myself? Thank you :)

这太不可思议了,我试图将apk发送给我的一个朋友……他得到了推送通知,但我没有!为什么有可能?

This is incredible, I've tried to send the apk to one friend of mine... and he gets the push notifications but I don't! why could it be possible?

我刚刚打开了8253端口,因为我看到一些帖子对此进行了报告,但是它仍然无法正常工作. :'(

I've just opened the port 8253 as I've seen some posts reporting this, but it's still not working. :'(

推荐答案

主要问题是我正在使用Genymotion.

The main problem is I was working with Genymotion.

作为模拟器,推送通知应该完全到达或不到达,但有时会到达.我无法解释原因.

Being a simulator, push notifications should ARRIVE or NOT ARRIVE at all, but they were arriving sometimes. I can't explain why.

这篇关于无法从Parse.com发送推送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆