-1

I'm new to basic4android for develop Android applications.

I need gps / httpclient library for testing a sample.

Or could you give me another solution for writing a gps and web service call application in basic4android?

thank you

AusCBloke
  • 18,014
  • 6
  • 40
  • 44
AbbasS
  • 99
  • 1
  • 1
  • 6

1 Answers1

0

First of all, you have to add the GPS library to your project. After that is really easy:

First, you have to declare a GPS objet:

Sub Process_Globals
    Dim GPS1 As GPS
End Sub

After that, you have to initialice the object:

Sub Activity_Create(FirstTime As Boolean)
    If FirstTime Then
        GPS1.Initialize("GPS")
    End If
End Sub

Then you have to use, the GPS event that is called when location has changed:

Sub GPS_LocationChanged (Location1 As Location)
    Dim Lat, Long as string
    Lat = Location1.ConvertToMinutes(Location1.Latitude)
    Lon = Location1.ConvertToMinutes(Location1.Longitude)
End Sub

Now you'll have to stablish connection with send service, and send data.

Manu
  • 1,130
  • 3
  • 10
  • 26