Skip to content
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

Added fix for iOS when app is killed app #56

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

cladjules
Copy link

Use hasListeners to check whether or not listeners have been added yet.
Queue the listeners and once the listeners are added, send them to the event.

@cladjules
Copy link
Author

cladjules commented May 10, 2020

I have merged #46, as Android was not working in the background. And that PR hasn't been merged for months.

It should now be fully working for both Android & iOS when the App is killed (both Android <8 and 8+).

I have modified it, so you can specify your own title/text and icon for the ongoing notification.

<meta-data  android:name="rnboundary.notification_title"
    android:value="Location found"/>
<meta-data  android:name="rnboundary.notification_text"
    android:value="You are close to the to the geofence"/>
<meta-data  android:name="rnboundary.notification_icon"
    android:resource="@mipmap/ic_notification" />

It seems like there hasn't been any update on that repo for months, I wonder if we should move to another repo and maintain it?

@NuclearKev
Copy link

Changing repos may be useful. We would want to make sure that we upload the new version to npm as well. :)

@mathiasmoeller
Copy link

Whats the status on this @NuclearKev @cladjules ? Will this be released in some way?
Thanks already for the great work!

@xoapit
Copy link

xoapit commented Jun 13, 2020

I tested it in iOS, it is working well. The package should be released soon? @NuclearKev @cladjules

@mathiasmoeller
Copy link

mathiasmoeller commented Jul 3, 2020

Hey. I am currently testing this on iOS and I am facing a bit strange behaviour.
When the App is in fore- or background everything is normal. When the app is killed and the device leaves a geofence, the onExit event is triggered twice, with a ~1 second delay.
image
The first event in this screenshot is from when the app was in the foreground.
The following two arrived when the app was killed. Why is it duplicated? Can anyone of you reproduce this as well?

The log is from the native ios implementation part of boundary.

@mathiasmoeller
Copy link

@cladjules I am suddenly facing several new issues. Might be related to issues with new Android patches? (I know they worked a bit on these APIs for the Corona Apps)

Sometimes it fails to add geofences.
I get the log message:

 RNBoundary: Failed to add geofence.

and the function is rejected with an error with the message 1000:.

Secondly, it happens quite often (more or less 50% of the time) that geofence crossings are not reported when the app is killed. This was working pretty stable before. Any idea what could be the reason for this?

@NuclearKev do you face the same behavior?

@rahulmr-rently
Copy link

Thanks for this great work and it works in ios without any issues but I also get the same issue in android now. and is giving me the error
error :( Error: 1000:
at Object.promiseMethodWrapper [as add] (NativeModules.js:103)
at index.js:35

Would it be possible for you @cladjules @NuclearKev to check this and help.It would be really helpful it this gets resolved

Copy link

@MuhammadRafeh MuhammadRafeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have u test this? is this running fine?

@kiwavi
Copy link

kiwavi commented Dec 5, 2023

I have merged #46, as Android was not working in the background. And that PR hasn't been merged for months.

It should now be fully working for both Android & iOS when the App is killed (both Android <8 and 8+).

I have modified it, so you can specify your own title/text and icon for the ongoing notification.

<meta-data  android:name="rnboundary.notification_title"
    android:value="Location found"/>
<meta-data  android:name="rnboundary.notification_text"
    android:value="You are close to the to the geofence"/>
<meta-data  android:name="rnboundary.notification_icon"
    android:resource="@mipmap/ic_notification" />

It seems like there hasn't been any update on that repo for months, I wonder if we should move to another repo and maintain it?

Would it also work for android 10+, given the baclground restrictions that were introduced?

@NuclearKev
Copy link

Would it also work for android 10+, given the baclground restrictions that were introduced?

I've been using the a fork of this on Android 10+ for months and it's been working fine. You just need to make sure you have the correct permissions enabled. Here is the fork if you want to use it. https://github.com/skedlife/react-native-boundary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants