-
Notifications
You must be signed in to change notification settings - Fork 316
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
Android: No scanning when app is killed #228
Comments
Same issue here. I used react-native-background-actions but so far on my tests it receives empty beacon when in background mode in Android. |
You can use mine spurdow@86222d6. How to add in your
then I wasn;t yet able to add readme and on how to configure foreground service due to time constraint , but I can give you what i used:
And make sure you have something like the below as well to support chinese or forked oems.
And last prerequisite is the below make sure you have this on your manifest.
|
@dmontecillo Thanks for your comment, but I have some questions.. first of all I tried to use your code and get eternal push notification with data that I have set to notifData obj and it is not very understandable how should I use it. Because in usual ios case I use Beacons.BeaconsEventEmitter.addListener('regionDidEnter', data => {...}) and when regionDidEnter I just sent push notification (and looks like you create your own push notifications). But in your case it look like you sent push notification before startMonitoringForRegion initialization. |
Hello @usichenko-nikita To answer your questions:
Sorry but for now due to time constraint to my project and since I was implementing it rapidly, I cannot provide you but I will try this week if i can create one separate app and public it in github. |
@usichenko-nikita Hi, This article has detailed how to get foreground service work on RN. |
@usichenko-nikita @dmontecillo @AjeyBS Using the code changes sugegsted by @dmontecillo in Android beacons scanning is working ONLY for a couple of minutes, after the app is killed. Is this expected behavior? But in iOS, when I close the app, am unable to see the logs in the console. I doubt that beacons scannig is not working in iOS when app is killed. Any idea how to get this working? Please help me |
Version
"react-native-beacons-manager": "git://github.com/MacKentoch/react-native-beacons-manager"
"react-native": "0.64.0",
Platform
Android
Expected behavior
The app continue detecting beacons even if app is killed
Actual behavior
The scan stops when app is killed
It works correctly on IOS but It does not work on android..
Can someone provide the solution?
The text was updated successfully, but these errors were encountered: