Will it eat my battery? I need the alarm is up-to-date with current user location.
Yes, and there is no guarantee that your app will receive the location updates in a timely fashion (e.g., if the device is asleep).
Do I have to set my application always in wake mode (wake lock)?
Holding a WakeLock
will help to keep your app running, but it will drain the battery very quickly -- especially if you're tracking a user over hundreds of miles.
If my solution is not good, what's your suggestion?
Please consider using AlarmManager to check the device location periodically. Handling an alarm every 15-30 minutes will use far less battery power than using a full-time location listener. You can register and unregister the location listener each time an alarm fires. As long as the app acquires a WakeLock
when it handles each alarm (and releases the lock immediately afterward), the app will receive regular location updates and will not drain the battery. You might want to look at WakefulIntentService as a solution for handling the alarms and WakeLocks.