0

I am developing an app where I have to retrieve the latitude and longitude of a location and save in a database. Second thing is that I want the user to get a notification when he reaches the same place again. i have no idea how to keep the app running in the background. can anyone give me an idea how to proceed?

anu_r
  • 1,602
  • 7
  • 30
  • 61

3 Answers3

0

Similar question has already been asked here: Run only a background service when application start

There is also a thread about this on Appcelerator: http://developer.appcelerator.com/question/138478/background-service-on-android

Also, you can find a tutorial for Android Services here: http://danielnadeau.blogspot.com/2013/10/android-services-tutorial-run-tasks-in.html

Community
  • 1
  • 1
bosnjak
  • 8,424
  • 2
  • 21
  • 47
0

There are 4 types of components an android app can consist of: Broadcast Receivers, Content Providers, Activities and Services. You need Services.

http://developer.android.com/guide/components/fundamentals.html#Components

sulai
  • 5,204
  • 2
  • 29
  • 44