Menu

1 / 2

How to Add Geofencing to an Ionic App

DEV Community: ionic·Robin·5 days ago
#uK4uNRQe
#devtoionic#devto#dev#store#geofences
Reading 0:00
15s threshold

In this tutorial, we build a store reminder page in Ionic Angular: switch on a toggle for a store, and when you later walk within 200 meters of it, your phone reminds you to open your shopping list, even if the app was closed hours ago. You will learn how to request background location in two steps, register and remove geofences, show a native notification per geofence and read the transitions your app missed.

Most Ionic geofencing tutorials still use cordova-plugin-geofence , whose last release (0.7.0) dates from 2017. We use a Capacitor plugin built on the native region monitoring of Android and iOS instead.

Prerequisites

An Ionic Angular app on Capacitor 8 with standalone components.

The Capacitor Geofences plugin . Full transparency: we build this plugin at Capawesome. It is part of Capawesome Insiders , a paid subscription.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.