Trace
By default, the recording of trace information is disabled. To enable the recording of traces for problem diagnosis by the Software Express team, the following settings must be added to the CLSIT file:
The files containing the trace (CliSiTef*.dmp) are written to the external storage directory (/sdcard). For this to be possible, the application needs to declare it in AndroidManifest.xml and, for API level 23 onwards, request permission android.permission.WRITE_EXTERNAL_STORAGE.
For API level 23 (Android 6.0) onwards, in addition to declaring the permission, the application also needs to ask the user for confirmation. To carry out this procedure correctly, we recommend consulting the Android documentation: https://developer.android.com/training/permissions/requesting
A simplified way to make this request is to include the code below in the main Activity's onCreate method:
But we reinforce the need to consult the official Android documentation to carry out the procedure appropriately for production applications.
Starting with Android 10 (API 29), it is no longer possible to request the WRITE_EXTERNAL_STORAGE permission to write to /sdcard. See suggestions to overcome this situation in Section 8.1.1.
If it is necessary to record the trace in another directory, use the DiretorioTrace parameter. In the example below, we configure CliSiTef to store the trace in the application’s “files” directory:
Due to changes in the interpretation of the DiretorioTrace parameter, we recommend its use only from version 117.7.r1 onwards. In previous versions, DiretorioTrace can only be used for absolute paths of up to 50 characters (for example: “/sdcard”).