# Get Geolocation when app is killed ionic ionic-v3

**URL:** <https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341>\
**Category:** ionic-v3\
**Created:** [November 12, 2018, 5:16pm UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341 "2018-11-12T17:16:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bewithjatin](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@bewithjatin](https://forum.ionicframework.com/u/bewithjatin)\
**Post date:** [November 12, 2018, 5:16pm UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341/1 "2018-11-12T17:16:34Z")

</div>

Want to get geolocation of user even when app is closed. Is it possible in ionic ???

---

<div class="post-metadata">

**Author:** ![Motoralfa](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/motoralfa/32/126293_2.png) [@Motoralfa](https://forum.ionicframework.com/u/Motoralfa)\
**Post date:** [November 16, 2018, 6:41pm UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341/2 "2018-11-16T18:41:14Z")

</div>

You can do it using the native Background Geolocation plugin. It allows you to see watch the position even when app is closed, and then call your http post for upload your data to your database.

> **[Ionic Framework](https://ionicframework.com/docs/native/background-geolocation/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

---

<div class="post-metadata">

**Author:** ![bewithjatin](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@bewithjatin](https://forum.ionicframework.com/u/bewithjatin)\
**Post date:** [November 16, 2018, 6:54pm UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341/3 "2018-11-16T18:54:09Z")

</div>

its not working when app is not in background its closed

---

<div class="post-metadata">

**Author:** ![Motoralfa](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/motoralfa/32/126293_2.png) [@Motoralfa](https://forum.ionicframework.com/u/Motoralfa)\
**Post date:** [November 26, 2018, 4:54pm UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341/4 "2018-11-26T16:54:22Z")

</div>

For that, is necessary to add the param  
`{stopOnTerminate: false}`  
It means the Geolocation will be continuing working even when app is closed.

---

<div class="post-metadata">

**Author:** ![sohandhainwal](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@sohandhainwal](https://forum.ionicframework.com/u/sohandhainwal)\
**Post date:** [January 30, 2020, 6:22am UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341/5 "2020-01-30T06:22:36Z")

</div>

Hi @Motoralfa  
I have use following configuration for get location on app background even app close

const config: BackgroundGeolocationConfig = {  
desiredAccuracy: 10,  
stationaryRadius: 20,  
distanceFilter: 30,  
debug: false,  
stopOnTerminate: false  
};  
App is working prefect on App running or background BUT WHEN I CLOSED THE APP THEN LOCATION IS NOT WORKING , I HAVE TRYING WITH WIFI EVEN MOBILE INTERNET .

IS THIS POSSIBLE CAN I GET LOCATION ON APP CLOSED?. PLEASE HELP ME

Thanks in advance

---

<div class="post-metadata">

**Author:** ![bewithjatin](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@bewithjatin](https://forum.ionicframework.com/u/bewithjatin)\
**Post date:** [January 30, 2020, 7:15am UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341/6 "2020-01-30T07:15:29Z")

</div>

Alredy did that but no luck

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:01pm UTC](https://forum.ionicframework.com/t/get-geolocation-when-app-is-killed-ionic-ionic-v3/147341/7 "2021-07-19T21:01:53Z")

</div>

Closed on July 19, 2021, 9:01pm UTC


