Question

Is there any way in Android to determine whether a device is running Sense UI? I'm working on an app that is working fine with vanilla Android, but Sense UI is messing with layouts and sizes. I'd like to be able to see whether the device is running Sense UI and so I can take appropriate action.

Was it helpful?

Solution

There is nothing built into Android that indicates what sorts of modifications like Sense are running on the device. You would either need to use PackageManager to look for HTC Sense components or use the Build class to determine what model device you are on. In either case, you would need to keep updating that "sniffing" logic as Sense is changed and is rolled out to new devices.

but Sense UI is messing with layouts and sizes

If you have a reproducible test case with source code that demonstrates these problems, I would be interested in seeing it.

There are only two scenarios I can think of that would fit your description:

  1. App widgets may display differently on the HTC Sense home screen, just as they may display differently on other home screens. Ideally, there would be no modification, but since you are running in another app's process, I can't rule it out.

  2. If you rely on android.R resources, those might have been modified by HTC as part of creating Sense, though you can always grab the standard ones from your SDK and ship them with your app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top