Android Question GPS longitude and latitude

tkenya

Member
I have tested the GPS sample and it's working . It's updated by the service start . When I add more pages to the app and try to show the other pages the app crashes . Kindly I need to submit the coordinates to an API but before this I need to save them to an SQL database
 

tkenya

Member
Am able to load the longitude well . I added a new page and a button to navigate to the page . When I load different page app crash
 
Upvote 0

tkenya

Member
I am developing an app that will act as a clock in and out based on GPS. I submit the coordinates via API then check if it's within range and get a confirmation with the API that I have clocked in or out
 
Upvote 0

emexes

Expert
Licensed User
When I load different page app crash

Does it crash in debug mode? Or does it only crash in release mode?

Is there any error message or crash report in the log?

Perhaps start logging stuff like:

- every time you receive GPS coordinates
- every time you move to a different page
- every time just before and after you submit GPS coordinates to the API
- every time just before and after you load a layout
 
Upvote 0

emexes

Expert
Licensed User
i need help in this one

Well, I gave it a red-hot go, found and downloaded libraries WebViewExtended and WebViewExtras (hopefully the same versions that you're using), but it's still not compiling, and still complaining about heaps of deprecated stuff. I am running B4A 11.80 (64 bit). Does it compile on yours? without eg:

1665039128460.png
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Don't use DoEvents - there are several warnings about this in the log. Also don't use Msgbox2 it is also deprecated and can cause crashes. There is a warning in the log about this too.

DoEvents is deprecated. It can lead to stability issues. Use Sleep(0) instead (if really needed). (warning #33)

Go through your code and replace all your DoEvents. Also you have lots of other warnings in the Log top pane so you should go through your code and sort them all out.

@emexes It compiles for me with the latest SDK and B4A using both Java 8 and 11.
 
Last edited:
Upvote 0
Top