You will receive information about burn in protection and low ambient through WatchFaceService.Engine.onPropertiesChanged
callback. For example:
@Override
public void onPropertiesChanged(Bundle properties) {
super.onPropertiesChanged(properties);
mLowBitAmbient = properties.getBoolean(PROPERTY_LOW_BIT_AMBIENT, false);
boolean burnInProtection = properties.getBoolean(PROPERTY_BURN_IN_PROTECTION, false);
mHourPaint.setTypeface(burnInProtection ? NORMAL_TYPEFACE : BOLD_TYPEFACE);
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "onPropertiesChanged: low-bit ambient = " + mLowBitAmbient);
}
}
If you want to test it, just directly set the values:
mLowAmbient = true;
boolean burnInProtection = true;
and run your code to see, if it renders the watch face. In this case you should render watch face as if it was in low ambient and with burn in protection. Check all 4 combinations and you are good to go, you can go back to fetching the values from the bundle.