cordova - Phonegap every 5 minutes wake app in background to check location iOS -


i'm building location-aware app in phonegap has check location periodically in background determine when user enters/exits specific places. question ios specifically. significant-change api no me because it's accuracy level more street-wise building-wise, , latter app requires.

so far, after reading comments in great answer this, i've managed keep app alive in background combination of background mode declaration (in config.xml):

<gap:config-file platform="ios" parent="uibackgroundmodes" mode="replace">     <array>         <string>location</string>     </array> </gap:config-file> 

and once when app in foreground after launched, calling:

navigator.geolocation.watchposition(...) 

what need is:

  1. the app fully suspended between intervals (as kill battery have app alive in bg under watchposition day long), , woken perform single getcurrentposition + post server each time.
  2. the app launched routine right device boot.

so:

i figured perhaps talk in here (but native , regardless phonegap...).

what whould best strategy achieve in phonegap way?

do guys know plugin or combination of plugins make possible?

should abuse timed remote notifications make app wake (heard may possible, don't know how apple approve that...)

or must make own plugin purpose?

any advice or experience appreciated.

as got learn through months passed after asking q, it's impossible wake app in background on timed interval in ios.

the best solution find:

as stated in q, objective determine when user enters/exists specific places (buildings, actually). best way possible address region monitoring api in ios wakes app in background once device enters specific geographical regions predetermined app. has limitations though trying various optimizations overcome them.

a few plugins cordova exists, 1 chose eventually: https://github.com/cowbell/cordova-plugin-geofence

took time implement...


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -