Q: Make sure time is provided by Internet I want to use the current online time in my Android application. I know that you can make sure that the time is provided by the Internet in the Settings of Android. How can I check that in Java?

A: You would need to check it yourself, using an SNTP client or something.
There is no requirement that a device use "the Internet" for automatically setting the time, even if the user has not manually changed the time. For example, many devices in the US rely on NITZ signals from the wireless carriers as their time source.

A: It seems that there's already a similar question here: How to use an Internet time server to get the time?
I must admit I haven't personaly used this, but it looks like it's worth a try. It uses apache commons library.
Copying relevant code (full explanation on the link):  
String TIME_SERVER = "time-a.nist.gov";   
NTPUDPClient timeClient = new NTPUDPClient();
InetAddress inetAddress = InetAddress.getByName(TIME_SERVER);
TimeInfo timeInfo = timeClient.getTime(inetAddress);
long returnTime = timeInfo.getMessage().getTransmitTimeStamp().getTime();
Date time = new Date(returnTime);

Something it doesn't say there is that the TIME_SERVER may not be updated. Here's a list of servers with their availability: http://tf.nist.gov/tf-cgi/servers.cgi#
Please let me know if this worked for you :)
