Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - How to know if device is WiFi only? [closed]

Is there anyway we can check if the Android Device is WiFi only? For example Nexus 7 have WiFi-Only device and WiFi&3G device.

like image 921
Zul Avatar asked Nov 20 '12 04:11

Zul


2 Answers

I assume that getPhoneType() would help you for this.

OR

You could query the system features in your app to see if that works

PackageManager pm = getPackageManager(); boolean isAPhone = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);

If you care about GSM/CDMA use the more specific FEATURE_TELEPHONY_GSM or FEATURE_TELEPHONY_CDMA.

If the device is lying there is of course not much you can do afaik.

like image 78
AnhSirk Dasarp Avatar answered Sep 17 '22 05:09

AnhSirk Dasarp


If you want to check that the wifi is connected or not then see this question:
How do I see if Wi-Fi is connected on Android?

If you want to check the network type than see this question:
how to check wifi or 3g network is available on android device

like image 20
totymedli Avatar answered Sep 17 '22 05:09

totymedli