Android: Force data to be sent over radio vs WiFi

前端 未结 5 1640
轮回少年
轮回少年 2020-12-02 21:36

Is it possible to force an Android application to use only the mobile radio connection (3g/4g/etc), disallowing the use of WiFi?

I think I want to use a HIPRI conne

5条回答
  •  天命终不由人
    2020-12-02 22:03

    In Android 2.2 you can use high-priority mobile data at the same time as WiFi. The value of the "feature" parameter is "enableHIPRI", and is hidden in the Phone API.

    Method: ConnectivityManager.startUsingNetworkFeature(int networkType, String feature) of http://developer.android.com/reference/android/net/ConnectivityManager.html

    Source: http://code.google.com/p/android/issues/detail?id=5885

    You could check this other answer: https://stackoverflow.com/a/4756630/327011

    This is NOT a good policy...use it if REALLY needed!

提交回复
热议问题