How to receive a push notification when you are near a specific place using a map?

↘锁芯ラ 提交于 2019-12-23 13:08:41

问题


I'm new to Ionic, and I'd like to know if you can give me some guidance. I am using Ionic 1. I have seen tutorials, and they use Google or one signal. But they are always basic tutorials and I have many doubts. I hope to do this for both iOS and Android.

My application has some coordinates in the database, I get them with a web service. I would like that when I'm near a place I get a push notification. I am currently using the Google Maps plugin cordova-plugin-googlemaps and the geolocation plugin cordova-plugin-geolocation.

  • I would like you to give me advice or if you have had the experience of doing something like this.

  • I also want to know if doing this has any cost.

  • I am using Ionic 1 and the database is built in MySQL using PHP. I think the push notification is generated from the back-end?

  • When I tap on the notification, can it contain an iconor redirect to a specific place in my app?

In conclusion:

What is the best alternative? I was thinking of some plugin that detects in the background when my location changes and when this happens (does the cordova-plugin-geolocation do it?) verify if I'm close to a certain place and send a local notification. For example, and when I tap on this notification I can get the id of that place and redirect to a place in my app.


回答1:


I think you should try geofence

repo link

example links:

https://github.com/cowbell/ionic-geofence built with Ionic framework

https://github.com/tsubik/ionic2-geofence built with Ionic 2 framework



来源:https://stackoverflow.com/questions/50894188/how-to-receive-a-push-notification-when-you-are-near-a-specific-place-using-a-ma

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!