Discussion:
[chromium-discuss] Re: [chromium-dev] Push notification on android in Background data restricted mode.
Peter Beverloo
2017-11-28 13:00:08 UTC
Permalink
+chromium-discuss, chromium-dev to bcc

Are you using the JavaScript Push API or are you developing a feature on
top of Chrome's GCM Driver?

In either case, which Android version are you using? We're aware of message
delivery being subject to Doze mode even for high priority messages in
Android N and O, in all other versions it should be fine.

Thanks,
Peter
In Android, Push notifications get disabled when Chrome is in background
data restricted mode.
I guess we use GCM services which would be running even when above
condition is met.
Still notifications are blocked. How is this managed?
Any pointers to sample code snippet will help.
Thanks
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit https://groups.google.com/a/
chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-
c3ae2d798101%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-c3ae2d798101%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Peter Beverloo
2018-09-18 11:00:44 UTC
Permalink
Chrome is subject to the same background limitations as any other
application when we want to execute in background for handling a push
message. We schedule a job with the JobScheduler that has a deadline of 0,
and handle the received message as part of that job. Depending on the
device state that might fire either immediately, or after an arbitrary
delay.

Thanks,
Peter
How does chrome overcome 'Background Execution Limits in Oreo'?
I know that GcmReceiver.doStartService() is still called when chrome is in
background.
Did chrome do something special?
Thanks.
Post by Peter Beverloo
+chromium-discuss, chromium-dev to bcc
Are you using the JavaScript Push API or are you developing a feature on
top of Chrome's GCM Driver?
In either case, which Android version are you using? We're aware of
message delivery being subject to Doze mode even for high priority messages
in Android N and O, in all other versions it should be fine.
Thanks,
Peter
In Android, Push notifications get disabled when Chrome is in background
data restricted mode.
I guess we use GCM services which would be running even when above
condition is met.
Still notifications are blocked. How is this managed?
Any pointers to sample code snippet will help.
Thanks
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-c3ae2d798101%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-c3ae2d798101%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
w***@gmail.com
2018-09-18 11:01:48 UTC
Permalink
How does chrome overcomes background execution limits in Oreo?
I think that GcmReceiver.doStartService() is still called when chrome is in
background.

Does chrome do something special?

I'm developing a chrome-based browser.
We updates android API to 27 based on chrome 60.
Whenever push comes in background, app crashes with this callstack.

java.lang.RuntimeException: Unable to start receiver
com.google.android.gms.gcm.GcmReceiver: java.lang.IllegalStateException:
Not allowed to start service Intent {
act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=xxx
cmp=xxx/org.chromium.chrome.browser.services.gcm.ChromeGcmListenerService
(has extras) }: app is in background uid UidRecord{da381bf u0a175 RCVR
bg:+1m41s17ms idle change:uncached procs:3 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3194)
at android.app.ActivityThread.-wrap17(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.IllegalStateException: Not allowed to start service
Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=xxx
cmp=xxx/org.chromium.chrome.browser.services.gcm.ChromeGcmListenerService
(has extras) }: app is in background uid UidRecord{da381bf u0a175 RCVR
bg:+1m41s17ms idle change:uncached procs:3 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1521)
at android.app.ContextImpl.startService(ContextImpl.java:1477)
at android.content.ContextWrapper.startService(ContextWrapper.java:650)
at android.content.ContextWrapper.startService(ContextWrapper.java:650)
at android.support.v4.a.m.a(m.java:99)
at
com.google.android.gms.gcm.GcmReceiver.doStartService(GcmReceiver.java:0)
at com.google.android.gms.gcm.GcmReceiver.zzd(GcmReceiver.java:0)
at com.google.android.gms.gcm.GcmReceiver.onReceive(GcmReceiver.java:0)

Thanks.
Post by Peter Beverloo
+chromium-discuss, chromium-dev to bcc
Are you using the JavaScript Push API or are you developing a feature on
top of Chrome's GCM Driver?
In either case, which Android version are you using? We're aware of
message delivery being subject to Doze mode even for high priority messages
in Android N and O, in all other versions it should be fine.
Thanks,
Peter
In Android, Push notifications get disabled when Chrome is in background
data restricted mode.
I guess we use GCM services which would be running even when above
condition is met.
Still notifications are blocked. How is this managed?
Any pointers to sample code snippet will help.
Thanks
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-c3ae2d798101%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-c3ae2d798101%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Peter Beverloo
2018-09-18 11:17:56 UTC
Permalink
I'm not sure starting which release Chromium started meeting the
requirements for API level 27, but we fixed that issue in Chrome 58 per
commit 943bc63
<https://chromium.googlesource.com/chromium/src/+/943bc63a8ff268394bdc0092c77977001626066c>.
Note that you're ten Chromium versions behind - please update to the latest
version, I'm not sure anyone is going to be able to help you with anything
that old anymore.

Thanks,
Peter
Post by w***@gmail.com
How does chrome overcomes background execution limits in Oreo?
I think that GcmReceiver.doStartService() is still called when chrome is
in background.
Does chrome do something special?
I'm developing a chrome-based browser.
We updates android API to 27 based on chrome 60.
Whenever push comes in background, app crashes with this callstack.
java.lang.RuntimeException: Unable to start receiver
Not allowed to start service Intent {
act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=xxx
cmp=xxx/org.chromium.chrome.browser.services.gcm.ChromeGcmListenerService
(has extras) }: app is in background uid UidRecord{da381bf u0a175 RCVR
bg:+1m41s17ms idle change:uncached procs:3 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3194)
at android.app.ActivityThread.-wrap17(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.IllegalStateException: Not allowed to start service
Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=xxx
cmp=xxx/org.chromium.chrome.browser.services.gcm.ChromeGcmListenerService
(has extras) }: app is in background uid UidRecord{da381bf u0a175 RCVR
bg:+1m41s17ms idle change:uncached procs:3 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1521)
at android.app.ContextImpl.startService(ContextImpl.java:1477)
at android.content.ContextWrapper.startService(ContextWrapper.java:650)
at android.content.ContextWrapper.startService(ContextWrapper.java:650)
at android.support.v4.a.m.a(m.java:99)
at
com.google.android.gms.gcm.GcmReceiver.doStartService(GcmReceiver.java:0)
at com.google.android.gms.gcm.GcmReceiver.zzd(GcmReceiver.java:0)
at com.google.android.gms.gcm.GcmReceiver.onReceive(GcmReceiver.java:0)
Thanks.
Post by Peter Beverloo
+chromium-discuss, chromium-dev to bcc
Are you using the JavaScript Push API or are you developing a feature on
top of Chrome's GCM Driver?
In either case, which Android version are you using? We're aware of
message delivery being subject to Doze mode even for high priority messages
in Android N and O, in all other versions it should be fine.
Thanks,
Peter
In Android, Push notifications get disabled when Chrome is in background
data restricted mode.
I guess we use GCM services which would be running even when above
condition is met.
Still notifications are blocked. How is this managed?
Any pointers to sample code snippet will help.
Thanks
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-c3ae2d798101%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c7ddb798-2f02-46a3-b5f2-c3ae2d798101%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...