Setting the screen dimensions

The apkruntime-start.sh must specify the appropriate screen dimensions for the APK runtime to use to render its applications.

About the APK runtime screen

At system startup, System Launch and Monitor (SLM) launches the APK runtime by invoking a script named /scripts/apkruntime-start.sh. This script sets a number of properties for the APK runtime, including adaptive partitions (see "Adaptive partitioning for the APK runtime") and the screen resolution.

For example, on the QNX CAR platform, the usable screen size for an APK application is less than the physical screen size. This is because the default HMI divides the screen into three areas: the status (or information) bar, the application area, and the tab (or navigation) bar.

Figure 1. The QNX CAR platform screen areas

When an application is launched, its viewable area is contained within the application area. Different vendors may decide to use different heights for the status bar or tab bar, or even remove the status bar entirely.

Specifying screen dimensions in the startup script

Due to the variability of the application area on the screen, the apkruntime-start.sh startup script must specify the appropriate screen dimensions for the APK runtime to use to render its applications. The script specifies values for the WIDTH and HEIGHT variables that it sends to the PPS control object (found at /pps/services/launcher/control). The apkruntime-start.sh script contains the following line, which sends the PPS message to set the variables and start the APK runtime:

echo "msg::start\ndat::$AP_APP,ORIENTATION=0,WIDTH=800,HEIGHT=395\nid:n:3080\nmsg::start\n" >> /pps/services/launcher/control         
     

You should ensure that these are the correct dimensions for your screen and its components, and then adjust them as needed.

Note: If WIDTH and HEIGHT are not provided, APK applications take up the entire screen. Even if you chose not to set these variables, APK applications will be overlaid by the status bar and tab bar because of their z-ordering.

The set-resolution.sh script automatically adjusts the apkruntime-start.sh script (for example, if you change the resolution with a set-resolution.sh 720p command).