Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/190.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 没有收到任何解析推送_Android_Parse Platform_Broadcastreceiver - Fatal编程技术网

Android 没有收到任何解析推送

Android 没有收到任何解析推送,android,parse-platform,broadcastreceiver,Android,Parse Platform,Broadcastreceiver,我已经完成了Parse.com上概述的每一步。我第一次尝试使用自定义的BroadcastReceiver(子类化ParsePushBroadcastReceiver),但即使没有它,Parse-Push似乎也不起作用。下面是我的AndroidManifest.xml(在关闭标记之前的代码片段): …在我打开标签之前: <!-- For Parse Push --> <service android:name="com.parse.PushService" /> &l

我已经完成了Parse.com上概述的每一步。我第一次尝试使用自定义的
BroadcastReceiver
(子类化
ParsePushBroadcastReceiver
),但即使没有它,Parse-Push似乎也不起作用。下面是我的
AndroidManifest.xml
(在关闭
标记之前的代码片段):


…在我打开
标签之前:

<!-- For Parse Push -->
<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="my.package.name" />
    </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>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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="my.package.name.permission.C2D_MESSAGE" />
<uses-permission android:name="my.package.name.permission.C2D_MESSAGE" />

我尝试过各种组合,但绝对没有尝试过


非常感谢您的帮助!:-)

我会被炒鱿鱼的!这是我如何让它工作的。首先,我转而使用Android版的
Parse Push QuickStart指南中的代码,而不是过时的Parse教程。在浪费了4个小时之后,我现在看到教程(Ikr?)中遗漏了一个必要的
WAKE_LOCK
权限。(想必)更重要的是,在您的应用程序类中,这里有一个似乎可以修复它的更改,它可能是大脑刺客:

public void onCreate() {
    Parse.enableLocalDatastore(getApplicationContext());
    Parse.initialize(this, "fo00", "b4r");
    ParseFacebookUtils.initialize(this);
    ParseInstallation.getCurrentInstallation().saveInBackground();
    super.onCreate(); // Moved this from right at the top, to right at the bottom
} 

您确定android:exported=“false”
?@njzk2感谢您的快速回复!我在Parse的教程/指南中就是这样写的:@njzk2感谢指针-快速入门指南中的更新代码缺少这一部分,这让我需要更详细地阅读它!