I have problem with ParseBroadcastReceiver
. Everything worked OK, till we went to API 27. And now we are getting java.lang.RuntimeException
, and app crashes every time when goes to sleep and after awakening a device.
Bellow is my code.
And in my Application class
public class PopeApp extends Application {
public void onCreate() {
Parse.enableLocalDatastore(this);
Parse.initialize(new Parse.Configuration.Builder(this)
.applicationId(Defines.parseApplicationID)
.clientKey(Defines.parseClientKey)
.server(Defines.parseURL)
.build()
);
}
}
AndroidManifest.xml
<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.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" />
<action android:name="1" />
</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" />
<!-- IMPORTANT: Change "com.parse.starter" to match your app's package name. -->
<category android:name="com.MidCenturyMedia.Shopper.light" />
</intent-filter>
</receiver>