-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unlock and wakeup methods are not working #492
Comments
I am facing a similar issue where calling the method unlock it brings forward the app that's in the top of the foreground or app drawer stack on android. |
@Taxi4you @arvindder Having the same issue, my sample code is below, running on android, I am using local notification plugin to trigger a callback after 10 seconds. That calls background-mode code when phone in sleep to unlock. Everything works fine, callback fires but unlock() does nothing..
|
I stopped using this plugin and moved to push notifications and service workers for my app's use case. |
Whats service workers are? |
@arvindder The reason this did not work for me was that I was using local notification plugin to trigger a wakeup, there seems to be a problem when that plugin is triggering background mode wakeUp. This is the function that is called (as callback) when we get a signal from bluetooth while phone is in sleep (I am not sure we need all five function calls below but this is what works for us, and as doc says this is only supported on android):
|
That's what I am trying to do:
But the app only popped up when the screen is on and in the homescreen.
When screen is off, the screen just getting ignited and the unlock with code is still required.
When trying to ignite it when other apps are on the foreground, nothing happens.
Even when I made WhatsApp on the foreground and minized it to be on the background, the method actually launched WhatsApp instead of my app..
BTW, is this suppose to support iOS?
The text was updated successfully, but these errors were encountered: