Note: I haven't used any Background Services like Intent Services etc..since they easily get destroyed in modern smartphones due their optimized architechture to prevent battery life. That's why i have used Alarm Service.
Sign Up | Login |
---|---|
Points:
- Username length should be > 3.
- Password length should be > 3.
- Mobile number length = 10. Used Sqlite to store these informations.
Points:
- When service is started, then alarm service will be called. It will store current GPS location every 5 to 10 minutes of interval.
- The results with time will be stored in SQLite in the form (id,Logitude,latitude,time).
- The 3 vertical dots in top right corner is for Logout.
- Note: We are not storing last khown location, instead our app will explicitly request new current GPS location.
Points:
- These are the history of all locations.
- Sorted base on Recent time.
- "Clear All" option given at top to clear all locations.
- "Clear All" only visible in History Fragment not in others fragment.
- When an item is click from list, it will open the Map with clicked location.
When service is stopped | When Directly click on Map | When item of history is clicked |
---|---|---|
Points:
- See the bottom Menus for differences in Map.
- There are 3 ways Map opens.
- When you stop service, it will open the map with last save location.
- When click on one of the item of Location history, it will open mapp with this location on it.
- When directly click the map button, it will start requesting GPS locations, and keep on monitoring and changing the location like Google map.
- As soon as you go to other fragment(Home or history) from Map, GPS service will get destroyed, since this GPS service is linked with Map fragment.
- This GPS service and the GPS service invoke by Alarm service are 2 different services.
- We have only 1 map which is placed in middle fragment named MAP. But above is an example of opening the same fragmentr/map in defferent ways with different responses.