java - How to toggle the option returned by ConnectivityManager.getBackgroundDataSetting()? -


Does anyone see the flag?

How do toggle the option given by connectivity manager.atbackgrounddata settings () in the amulator?

The short answer is that you can not

The long answer is that you Do not want it is one of them, and should not be tampered directly

Docks in the link above the state:

< P> Secure system settings, which have System Preferences, which can read applications but are not allowed to write. These are the preferences for which the user should be modified for these values ​​via the system UI or special API, which are not directly modified by the applications.

The easiest way to do this is to point users to the correct settings using the SYNC_SETTINGS verb:

  Please. Intent = intent ("android.settings.SYNC_SETTINGS"); Intent.addCategory ("android.intent.category.DEFAULT"); StartActivity;  

This is most likely to break your app's flow, but it will ensure that the user knows about the change in settings.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -