Android Code Snippet How to use gps as a service

This is a sample project for using GPS in a service Module
 

Attachments

  • gpsServiceExample.zip
    8.7 KB · Views: 950

Beja

Expert
Licensed User
Longtime User
Thanks Reviewnow.
Downloaded it.. will try it later.
 

Beja

Expert
Licensed User
Longtime User
How can I stop the service from coming each time I open the mobile? Anyway other than modifying the code and install it again?
 

Reviewnow

Active Member
Licensed User
Longtime User
in Activity_Create
Comment out this line
StartService(iGps)
the menu items can start and stop the service also
 

arnold steger

Member
Licensed User
Longtime User
when gps.start are called indoor then make any DateTime.TicksPerMinute a call of gps.gps notifice remain visible fixed.
when going outdoor and finde a gpssignal then listen any second or more the coordinate.
gps notifice remain visible fixed.
then is`nt posible to stopped gps.
I have tested in debugmode for check in run how is the point.
how can resolve this?
 
Last edited:

Beja

Expert
Licensed User
Longtime User
Hi Reviewnow,
I have couple of questions:
1- So this is kind of combination of a service and an activity, right?
2- In activity geoinformation page, gpslat: is repeated towice.. is the last one supposed to be gpsSpeed?
3- the word iGPS confuses because it looks like iPhone library.
 

jchal

Active Member
Licensed User
Longtime User
hi all i know ti is been some time sice the last posy but this example is what i was loong for to help me understand services.
i would like to ask if
B4X:
  If count >15 Then
acts like an interval? i am looking to store lon and lat data every minute not continusly as it does now.
can anybody gie me a hit on this using this example
 
Top