How do I disable the Internet connection in Android Emulator?

后端 未结 11 1702
执念已碎
执念已碎 2020-12-29 01:33

I am trying to check Internet connectivity on Android using the following method. I have a Wi-Fi connection.

private boolean checkInternetConnection() {
             


        
11条回答
  •  悲哀的现实
    2020-12-29 01:40

    Recent emulator versions provide an easier way, from an ADT view:

    Window -> Show view -> Other... -> Android -> Emulator Control
    

    Simply change "Data" value from "Telephony Status" and test your application again.

提交回复
热议问题