gps - Auto enable Wi-fi Location in Android 4.2.x -
i trying enable wi-fi & mobile location setting using code not got proper solution.
i able check if enable or disable using below code.
string provider = settings.secure.getstring(getcontentresolver(), settings.secure.location_providers_allowed);
if provider having "network" string wifi location enable otherwise disable.
but can pragmatically directly enable without prompt dialog?
is posible?
startactivityforresult(new intent(android.provider.settings.action_location_source_settings), 0);
i know can open setting screen directly don't want open directly enable, same gps.
below link work gps satelitte option. how wi-fi location?
how can enable or disable gps programmatically on android?
i using android 4.2 version.
but can pragmatically directly enable without prompt dialog?
fortunately, no, obvious privacy , security reasons.
below link work gps satelitte option
fortunately, android devices not affected security flaw.
Comments
Post a Comment