Quick Question:
Where can I find or check if a certain feature (Bluetooth, NFC, WiFi, GPS, ...) is present in an Android device?
For a simpler example: If the device doesn't have a Bluetooth available (ie: There is no bluetooth). Is there a way to check?
You can use the PackageManager
.
The below code checks if there is a camera available.
import android.content.pm.PackageManager;
PackageManager pm = context.getPackageManager();
if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
}
http://developer.android.com/reference/android/content/pm/PackageManager.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With