I’ve currently finished learning the basics of android development and am trying to learn to make an android gps app in smartphones for my traffic system project. Not so very good yet in doing complicated codes. Please advise some resources or tutorials which will greatly help me to make this app.
– the app will send gps locations( lat & longitude and time ) via sms every 10 seconds once it approach a specific road section ( can be like 0.5 km length of road)
– if the phone passed that specific road section it will stop sending its locations
I’ve currently finished learning the basics of android development and am trying to learn
Share
Why are you using the sms service to send the location? try using the webservice.
To implement this app you has to use the LocationManager and LocationListener libraries.
You can start by creating a gps listening class implementing the LocationListener, like the one shown below
}
Here I’m storing the updated locations on the Constants file. Start a sheduler that checks the locations periodically and start sending messages if they match your required locations.
To trigger the gps you can use
The scheduler you need is a timertask. This can be implemented as
}
}
});
}