How to use Backendless Push Service in android Oreo?

Hi, I have some problem with Backendless Push Service in android Oreo.
According android documentation (Background Execution Limits https://developer.android.com/about/versions/oreo/background.html) I can’t register my BackendlessCustomPushReceiver in manifest anymore.
How can I handle this issue?

Regards,
Roman

Hello,

what kind of error do you get?

03-15 14:04:29.225 32307-32307/ru.sbssoft.sphere.android.pub.v1 E/BroadcastReceiver: BroadcastReceiver trying to return result during a non-ordered broadcast
java.lang.RuntimeException: BroadcastReceiver trying to return result during a non-ordered broadcast
at android.content.BroadcastReceiver.checkSynchronousHint(BroadcastReceiver.java:649)
at android.content.BroadcastReceiver.setResultCode(BroadcastReceiver.java:415)
at com.backendless.push.BackendlessBroadcastReceiver.onReceive(BackendlessBroadcastReceiver.java:109)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3269)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1690)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:169)
at android.app.ActivityThread.main(ActivityThread.java:6595)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
03-15 14:04:29.243 32307-32503/ru.sbssoft.sphere.android.pub.v1 W/Notification: Use of stream types is deprecated for operations other than volume control
03-15 14:04:29.244 32307-32503/ru.sbssoft.sphere.android.pub.v1 W/Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
03-15 14:04:38.746 32307-32504/ru.sbssoft.sphere.android.pub.v1 W/EnhancedIntentService: Service took too long to process intent: com.google.android.c2dm.intent.RECEIVE App may get closed.

Getting this error on push target device

Hi Roman

Thanks, for your reply, internal ticket BKNDLSS-16778 is created, and our engineer take a look on it asap

Regards, Vlad

Hi, Roman.
We’ve made changes in our Android sdk. Please use new version of library.

// [url=https://mvnrepository.com/artifact/com.backendless/backendless]https://mvnrepository.com/artifact/com.backendless/backendless[/url]
compile group: 'com.backendless', name: 'backendless', version: '4.4.2'

Please, take into account that due to the new services start limitations in Android Oreo, you must declare permission for binding service.

 <service android:name=".PushService" 
 android:permission="android.permission.BIND_JOB_SERVICE"> 
 &lt;/service&gt;


// where PushService - is your service that extends com.backendless.push.BackendlessPushService

Hello, that’s solved my issue! Thanks for a quick solution and response!)

Regards, Roman