1

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>
ZoeDeep
  • 21
  • 3
  • what does your gradle file show, for proguard and depencies used? – Blundell Jun 14 '19 at 14:50
  • this is dependency in gradle file : compile ('com.github.parse-community.Parse-SDK-Android:parse:1.18.5') { exclude group: 'com.android.support', module: 'support-v4' } – ZoeDeep Jun 14 '19 at 14:55

1 Answers1

0

And this is Stack Trase :

android.app.ActivityThread.handleReceiver(ActivityThread.java:3290)
android.app.ActivityThread.-wrap20(ActivityThread.java)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1715)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:154)
android.app.ActivityThread.main(ActivityThread.java:6682)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
ZoeDeep
  • 21
  • 3