I am new to basic4android. I have programmed on dotnet and iPhone. now I need to make my app working on android and I think using basic4android should do it. I already made some simple tests and it worked great!
My questions. I strugle a little bit how to setup the code structure.
My app would be very simple
It needs to poll every x minutes data from a webservice and store this in the app using SQLite and based on the GPS Location it will display items on a listview.
So I was thinking to use a service Module to download the data and store this into a SQLDatabase every x minutes.
But I do not know eaxtly what to do with the GPS. Can I put this also in the service and send an event everytime there is a reasonable gps change to the main thread to update the listview?
You can use a single service for both the GPS and the data download. Your code always runs in the main thread (unlike libraries code). You can use CallSubDelayed to update the activity with the ListView whenever required.
You can use a single service for both the GPS and the data download. Your code always runs in the main thread (unlike libraries code). You can use CallSubDelayed to update the activity with the ListView whenever required.