Detecting and changing programmatically data connection (GPRS/UMTS) on Android -


I know that unfortunately it is not possible to detect and replace programmatic data connection (GPRS / UMTS) on vanilla Android, And to edit common functioning APN settings is a very good solution.

However on my device (Xperia X10), I have an additional setting with "Data roaming", which allows MMS and data to be enabled or disabled. I think this is a privatization created by Sony Ericsson, and maybe other vendors have something like this, is there any way to use this setting?

I do not have a SE phone, but I was seen in my system dump and:

  • Com in AOSP sources There are two internal methods in the Android. Internal.telephony interface: Enabled Data Connectivity () and Disabled Data Connectivity (). It is a part of the interface and its implementation system.
  • Com.android.phone has two ways with the same names as above. PhoneInterfaceManager which is a part of the Phone.apk app. These methods only make calls with the above / system.
  • Sony has modified the com.android.phone.PhoneInterfaceManager.enableDataConnectivity (), so it does additional checks to store in the shared probes of Boolean. If this is incorrect, enable the dataconnectivity () method always. Android calls the inactive data connectivity () of internal.telephony.
  • Of course it is controlled through Boolean Preferences screen: "MMS and data" it "com.android.phone_preferences" is stored in the preferred container and Preef key: "Data_service_key" Additionally, when you check If you switch to, then the settings activity automatically com. Android calls the ways to quickly switch data from internal.telephony.

If you want to add a data connection widget or something like this

  • You need it.
  • You need an "android.uid.phone" sharing id to access the above settings.
  • I think this phone. It would be best to modify APK, so it could catch a special purpose to enable / disable data. This data_service_key will set the boolean and will call one of the methods com.android.internal.telephony. It should be fairly easy to use, and then you will be able to very easily create widgets, apps and other stuff - they'll use that specific intent.


    Comments

    Popular posts from this blog

    windows - Heroku throws SQLITE3 Read only exception -

    lex - Building a lexical Analyzer in Java -

    python - rename keys in a dictionary -