android - Enabling GPS programmatically, causes the GPS indicator to flash while the GPS button is disabled -


in app developing, trying enable gps implicitly/programmatically using below posted code. result strange me, below posted code causes gps indicator flash means searching signal ongoing task, however, when wipe down notification bar, find gps button gray, means not active, when wipe notification bar, gps indicator flashes. below code intended that? how implicitly/programmatically enable gps?

code:

private void setgpsactive() {     // todo auto-generated method stub     intent activategpsintent = new intent("android.location.gps_enabled_change");     activategpsintent.putextra("enabled", true);     sendbroadcast(activategpsintent); } 


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -