Skip Navigation

Support for Night Mode

The 
BlackBerry Dynamics SDK for Android
 version 6.1 and later supports Night Mode. The Greetings server and Application policy sample apps in the SDK package demonstrate how to support this feature. The other sample apps use light mode.
You can turn off support for Night Mode in the 
BlackBerry Dynamics
 UI by adding the following code to the application class:
import android.support.v7.app.AppCompatDelegate; ... AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
This can be useful for apps that do not support Night Mode, to ensure a consistent UI experience (all screens will use light mode). Most of the sample apps in the SDK package include this code for reference.
The internal style and theme definitions included with the 
BlackBerry Dynamics
 SDK have changed. If your app was previously making use of any of these definitions, you may get errors when building your app, and may have to rework your UI to avoid some dependencies. It is a best practice that you do not rely on 
BlackBerry Dynamics
 styles when coding your UI. Please contact 
BlackBerry
 support if your app relied on a particular style and you need to know how it was defined.