Can I somehow detect if my app is running on HTC Sense?
More generally, the problem is, that I have a Button with custom drawable. It's something very similar to the account switcher in the top right of Gmail app. When pressed or focused, the button has orange highlight. But that doesn't look nice on HTC Sense - because the standard highlight color there is green.
HTC Sense™ Home is a behaviour-detecting homescreen widget that uses a geo fence to surface apps that you need based on your location. Using your preferences, it provides the tools that you need based on three categories: home, work or out. Your homescreen auto loads with the apps that you use throughout your day.
Check the cable connection Make sure you connect your phone to a USB 2.0 or faster port on your computer. Try a different USB cable. Make sure to use an HTC-branded cable. Try connecting your phone to another computer that has the latest HTC Sync Manager version installed.
Lets see android.os.Build strings I am not sure what the HTC folks use a combination to indicate a HTC sense device..
Here's a link suggesting a way to detect HTC Sense on the device, about 1/3 the way down the discussion. I've tested on Desire and Desire Z.
Code is below (from a user: David):
private static final String SENSE_UI_LAUNCHER_NAME =
"com.htc.launcher.Launcher";
private static Boolean senseUI;
public static final boolean isSenseUI(Context context) {
if (senseUI == null) {
senseUI = false;
PackageManager packageManager = context.getPackageManager();
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
List<ResolveInfo> list = packageManager.queryIntentActivities(
intent, PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo info : list) {
if (info.activityInfo != null
&& SENSE_UI_LAUNCHER_NAME
.equals(info.activityInfo.name)) {
senseUI = true;
break;
}
}
}
return senseUI;
}
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