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

Geofence notification in background is working up to android version 7 only #297

Open
Nirmala1498 opened this issue May 17, 2019 · 0 comments

Comments

@Nirmala1498
Copy link

Hi,
Geofence Notification is not working in android versions above 7,
I am using ionic v3 and want to use Ionic built in Geofence plugin.
I have implemented as mentioned in the official docs
https://ionicframework.com/docs/v3/native/geofence/

private addGeofence() {
//options describing geofence
let fence = {
id: ‘69ca1b88-6fbe-4e80-a4d4-ff4d3748acdb’, //any unique ID
latitude: 37.285951, //center of geofence radius
longitude: -121.936650,
radius: 100, //radius to edge of geofence in meters
transitionType: 3, //see ‘Transition Types’ below
notification: { //notification settings
id: 1, //any unique ID
title: ‘You crossed a fence’, //notification title
text: ‘You just arrived to Gliwice city center.’, //notification body
openAppOnClick: true //open app when notification is tapped
}
}

this.geofence.addOrUpdate(fence).then(
() => console.log(‘Geofence added’),
(err) => console.log(‘Geofence failed to add’)
);
}

The issue which i am getting is, i am unable to find out when it comes specifically inside or exit. In both cases, promise is returning success(which says ‘ok’). For notification purpose , i need to know specific condition based on entering and exiting.

Thanks in advance.

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

No branches or pull requests

1 participant