I am following the gps tutorial in Visual Basic for Android Tutorial June 11 pdf. I am using a htc desire s however I don't seem to be able to get the app to recognise that the gps is turned on on the phone. The app halts at these lines of code
If GPS1.GPSEnabled = False Then 'turn on your GPS
ToastMessageShow("Please enable the GPS device", True)
StartActivity(GPS1.LocationSettingsIntent)
Else
I check the phones settings and it tells me that gps is turned on (though no icon to that effect appears in the status bar at the top of the phone)
When I press the continue button on the phone I get the following message
An error has occurred in sub main_activity_resume(B$A line 64)
If GPS1.GPSenabled=False Then 'turn on your GPS
java.lang.NullPointerException
Continue?
Pressing yes to that prompt results in the app freezing.
The gps on the phone is working, I tested it with google maps, and that works ok, indeed when google maps is working I do get the gps icon in the status bar.
Please help.
If GPS1.GPSEnabled = False Then 'turn on your GPS
ToastMessageShow("Please enable the GPS device", True)
StartActivity(GPS1.LocationSettingsIntent)
Else
I check the phones settings and it tells me that gps is turned on (though no icon to that effect appears in the status bar at the top of the phone)
When I press the continue button on the phone I get the following message
An error has occurred in sub main_activity_resume(B$A line 64)
If GPS1.GPSenabled=False Then 'turn on your GPS
java.lang.NullPointerException
Continue?
Pressing yes to that prompt results in the app freezing.
The gps on the phone is working, I tested it with google maps, and that works ok, indeed when google maps is working I do get the gps icon in the status bar.
Please help.