DirectStylus White List

NVIDIA has included many DirectStylus optimizations in the Android framework to improve the user experience when using the stylus. These optimization and improvements range from stylus/eraser system cursors, to advanced heuristics to provide enhanced palm rejection.

There may be circumstances when these optimizations and improvements may produce unexpected or less-than-optimal results for applications which are not specifically optimized for stylus usage. To ensure that the overall system experience is great for both DirectStylus optimized and non-DirectStylus optimized applications, NVIDIA has provided a DirectStylus white list service. This service, available on all DirectStylus devices, selectively provides different levels of features, and touch event reporting, depending on whether the foreground application is on the white list or not.

The DirectStylus white list comes pre-populated on DirectStylus devices out of the factory. Those devices can communicate with NVIDIA servers on a regular basis to update the white list for the device.

This section describes the various white list scenarios you may want to consider for your application, as well as tips on developing white list candidate applications and how to request your application be added to the next white list update.

White List Scenarios

Not every application needs to be on the DirectStylus white list in order to function properly. The following table describes the white list scenarios and what they mean for the application.

Scenario What it means
Not on white list All touch events are reported to the application as finger tool types. Touch width values are still reported through the API through getPressure().

If your application does not specifically handle the eraser tool type, and does not need to distinguish between the finger tool type and stylus tool type, you do not specifically need to have your application added to the white list. Many existing Android applications will continue to function properly without being on the white list. The stylus will still offer exceptional accuracy for your users.
On white list Touch events are reported as their unique tool types (finger, stylus, or eraser). Touch widths are reported through the API through getPressure().

This allows your application to take full advantage of all features of DirectStylus.

White list applications, such as Tegra Draw, are able to provide the user with the most differentiated stylus experience.
Selective runtime white list The application is not on the DirectStylus white list.

Specific portions of the application may require the white list functionality to be selectively turned on for the best user experience.

See the following section on Selective Runtime White Listing for information on how to dynamically and selectively add the application to the DirectStylus white list.

Selective Runtime White Listing

NVIDIA has modified the Android framework to allow applications to dynamically and selectively add or remove themselves from the DirectStylus white list. These runtime modifications are not persistent and may not be preserved across system restarts or application force stops. The recommended use for selective runtime white listing is to temporarily add or remove an application from the white list, for a specific section in the application. It is recommended that add/remove actions be applied in pairs.

To add itself to the DirectStylus white list temporarily, an application should broadcast the com.nvidia.intent.action.ENABLE_STYLUS intent with the data package set to a string that equals the full package name of the requesting application. When the section of the application needing temporary white list access has completed, the application should broadcast the com.nvidia.intent.action.ENABLE_STYLUS intent with the data package set to an empty string. Whenever the onResume() method of the application is called, it should rebroadcast the intent, as described above, if it still needs to be temporarily on the white list.

Intent Name Extras
com.nvidia.intent.action.ENABLE_STYLUS package (string) = full package name of the requesting application

Testing White List Candidate Applications

If you are developing an application which needs to be on the DirectStylus white list for production but is still in development, you can manually override the white list. This is a developer option located under the Settings > Developer options menu.

If Settings > Developer options is not available on your device, you will need to enter into developer mode by doing the following:

1) Go to Settings > About tablet.

2) Tap on Build number at the bottom of the screen repeatedly until the toast at the bottom of the screen tells you that you are a developer.

To force the device into a mode where all applications are treated as white list applications, go to Settings > Developer options and make sure Override stylus white list is checked.

Remember to uncheck this option after you are done developing your application, and want the device white list to function normally.




NVIDIA® GameWorks™ Documentation Rev. 1.0.220830 ©2014-2022. NVIDIA Corporation and affiliates. All Rights Reserved.