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.
Asked
Active
Viewed 2,127 times
5
-
1You mean, want to check wifi connection on your device?? – Lokesh Nov 20 '12 at 04:30
-
You mean you want to check whether its wifi enabled or not? – MysticMagicϡ Nov 20 '12 at 04:30
-
or do you want to check if your devices doesn't have 3/4G network enable? – MimiEAM Nov 20 '12 at 04:32
-
I want to know if the device can only have WIFI. Not if the device connected to WIFI. For example the Nexus 7 have Wifi-only & wifi/3G. – Zul Nov 21 '12 at 07:56
2 Answers
8
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.
AnhSirk Dasarp
- 9,026
- 6
- 43
- 54
2
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