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?
Asked
Active
Viewed 1,511 times
0
-
2services will help you http://developer.android.com/guide/components/services.html – Constantin Cerberus Mar 13 '14 at 12:39
-
Whenever you want to run your app in background you need to use Service which can be handle your app in background process. – Piyush Mar 13 '14 at 12:44
3 Answers
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
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