Domanda

I am porting an app which is already on Google Play to Nokia X. I removed all unnecessary resources to keep the installation file small. I want to prevent users from using the app on other devices and having a bad experience since the resources for higher density (xhdpi) or bigger screens (tablets) are no longer available.

Currently, I don't have access to a real device, and the code below only produces "unknown" as the manufacturer on the Nokia X device emulator.

My Question: What is the manufacturer of all three Nokia X devices, or is there a better method for identifying such a device?

if (!"nokia".equalsIgnoreCase(android.os.Build.MANUFACTURER)) {
    // do something
}
È stato utile?

Soluzione

The android.os.Build.MANUFACTURER is "Nokia" in all three announced Nokia X devices, so your code is correct.

Barring physical access to a device, I still recommend double checking your logic with a Nokia X device in Remote Device Access: http://developer.nokia.com/resources/remote-device-access

Altri suggerimenti

As pointed before by viviaino, the device manufacturer is "unkown" when running over a Nokia X emulator(AVD), it is needed to run a remote device or real Nokia X device to check the current manufacturer.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top