I want to know aproximately when is light and when is dark WITHOUT relying on gps, location or the light sensor of the device. Is it possible? Thanks for the help.
well, you must know at least coarse location of user, sunrise/sunset time is different in center of north pole and equator, isn't it?
on Android you can get approximate location with
Locale.getDefault().getCountry()
or
Locale.getDefault().getLanguage()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.