In my ionic project, i want a feature to show notification when a place reached. I used geofence to make it. but, when i was in that place the notification showing repeatedly. futures: 1.if i install the app,when i reached the position(already added),the notification must come.(background checking)
Observable.interval(100 * 60).subscribe(x => {
this.addGeofence();
});
................
............
private addGeofence() {
//options describing geofence
let fence = {
id: '69ca1b88-6fbe-4e80-a4d4-faizy4d3748acdb', //any unique ID
latitude: 8.556498, //center of geofence radius
longitude: 76.881820,
radius: 100, //radius to edge of geofence in meters
transitionType: 1, //see 'Transition Types' below
notification: { //notification settings
id: 121212122, //any unique ID
title: 'You crossed a fence', //notification title
text: 'You just arrived to white oval technology.', //notification body
openAppOnClick: true //open app when notification is tapped
}
}