RxLogger APIs

RxLogger 7.x

Overview

The functionality of RxLogger can be controlled using Android intents within a third-party application.


Enable RxLogger

Begins data collection for all enabled modules; the equivalent of tapping the Start button. Special instructions apply when RxLogger is operated in Secure Mode.

    com.symbol.rxlogger.intent.action.ENABLE

Secure Mode

To enable RxLogger in Secure Mode, use one of the following methods:

  • Enable RxLogger via shell command:

    com.symbol.rxlogger.intent.action.ENABLE_SHELL
    
  • Enable RxLogger via third-party app:

    com.symbol.rxlogger.intent.action.ENABLE -e "token" "<token-id>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


Disable RxLogger

Stops data collection for all modules; the equivalent of tapping the Stop button. Special instructions apply when RxLogger is operated in Secure Mode.

    com.symbol.rxlogger.intent.action.DISABLE

Secure Mode

To disable RxLogger in Secure Mode, use one of the following methods:

  • Disable RxLogger via shell command:

    com.symbol.rxlogger.intent.action.DISABLE_SHELL
    
  • Disable RxLogger via third-party app:

    com.symbol.rxlogger.intent.action.DISABLE -e "token" "<token-id>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


BackupNow

Triggers a backup for the current files in the RxLogger folder. These files are compressed into a zip file, following the naming convention Backup-<date>-<HHMMSS>.zip. Special instructions apply when RxLogger is operated in Secure Mode.

    com.symbol.rxlogger.intent.action.BACKUP_NOW

Secure Mode

To trigger a backup in secure mode, use one of the following methods:

  • BackupNow via shell command:

    com.symbol.rxlogger.intent.action.BACKUP_NOW_SHELL  -e "password" "<password>"
    
  • BackupNow via third-party app:

    com.symbol.rxlogger.intent.action.BACKUP_NOW -e "token" "<token-id>" -e "password" "<password>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


Error Logging

In the event of a failure with remote intents while in Secure Mode, error information can be found in the RxError.txt file.

Starting with the following platforms and RxLogger versions, this file is renamed toRxInfo.txt and contains both success and error information:

  • Android 11 on SD660 platform - RxLogger v7.0.4.43
  • Android 11 on SM6375 platform - RxLogger v7.75.5.49
  • Android 11 on QC6490 platform - RxLogger v7.0.5.38

Refer to Zebra Platform Devices list.

Error details may include instances where remote intents failed to start, stop, or back up RxLogger. The error file is located in either of the following folders:

  • Internal storage path: /sdcard/RxLogger/
  • External storage path: /storage/<UUID>/RxLogger/ (where <UUID> is the device's unique identifier)

Third-Party Token Request

When secure mode is activated, any third-party app trying to start/stop RxLogger or trigger a backup via intent must include a token as an extra within the intent. This token is obtained via any of the following methods:

  • Zebra Device Manager with delegation scope
    • The keys for the token and password are “token” and “password” respectively.
    • The delegation scope is delegation-zebra-com-symbol-secure-rxlogger.
  • Access Manager in StageNow:
    • The package name, signature and service identifier (for Android 13 or higher: delegation-zebra-com-symbol-secure-rxlogger) must be granted access through Service Access Action.

Follow this procedure to request the token and send an intent with the token as an extra:

  1. Download the library BroadcastProtectionLibrary.aar and import it into your application project.

    import com.zebra.security.broadcastprotection.BroadCastAuthenticator;
    
  2. Instantiate BroadCastAuthenticator() in your activity, fragment or service.

    BroadCastAuthenticator vIntentprotect=new BroadCastAuthenticator();
    
  3. Add the following code in the onCreate() method:

    vIntentprotect.initialize(getApplicationContext());
    
  4. If your application needs to request a token, call the getToken() API:

    String token=vIntentprotect.getToken("delegation-zebra-com-symbol-secure-rxlogger");
    
  5. Send the required intent along with the token as extras:

    Intent intent = new Intent();
    intent.setAction("<specify_intent>");
    intent.putExtra("token", token);
    sendBroadcast(intent);
    

    Replace <specify_intent> with the intent to send, e.g. com.symbol.rxlogger.intent.action.ENABLE or com.symbol.rxlogger.intent.action.BACKUP_NOW.

  6. Add the following code in the onDestroy() method:

    vIntentprotect.terminate();
    

Reset to Default

This resets RxLogger settings to their default values across all modules. Special instructions apply when RxLogger is in Secure Mode.

Select the method to perform a reset to default based on whether secure mode is enabled:

  • Standard Method (Non-secure) - Send an intent:

    com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT
    
  • Secure Method - Choose one of the following:

    • AppOps (Recommended) - Send an intent from a third-party app:

      com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT 
      
    • App Token - Send an intent with a token from a third-party app, replacing <token-id> with the obtained token (see App Token):

      com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT  -e "token" "<token-id>"
      
    • Shell Command - Execute the following command:

      com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT_SHELL
      

Status

This intent notifies the third-party app that RxLogger settings have been restored to their default state. RxLogger dispatches this acknowledgment intent upon completing the reset process.

Intent:

    com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT_STATUS 

Delete Logs

This removes logs located in the RxLogger folder. Special instructions apply when RxLogger is in Secure Mode.

Select the method to delete logs based on whether secure mode is enabled:

  • Standard Method (Non-secure) - Send an intent:

    com.symbol.rxlogger.intent.action.DELETE_LOGS -e logType <logType>
    

    Replace <logType> with one of the following values:

    • 0 - (default) Delete all logs and backup files
    • 1 - Delete only log files
    • 2 - Delete only backup files Any other value or absence of this value defaults to deleting all files.
  • Secure Method - Choose one of the following:

    • AppOps (Recommended) - Send an intent from a third-party app:

      com.symbol.rxlogger.intent.action.DELETE_LOGS  -e logType <logType>
      
    • App Token - Send an intent with a token from a third-party app, replacing <token-id> with the obtained token (see App Token):

      com.symbol.rxlogger.intent.action.DELETE_LOGS   -e "token" "<token-id>" -e logType <logType>
      
    • Shell Command - Execute the following command:

      com.symbol.rxlogger.intent.action.DELETE_LOGS _SHELL -e logType <logType>
      

    Replace <logType> with one of the following values:

    • 0 - (default) Delete all logs and backup files
    • 1 - Delete only log files
    • 2 - Delete only backup files Any other value or absence of this value defaults to deleting all files.

Status

This intent notifies the third-party app that the RxLogger logs have been deleted. RxLogger issues this acknowledgment after completing the deletion process.

Intent:

    com.symbol.rxlogger.intent.action.DELETE_LOGS_STATUS  

Bug Report

This initiates the process of generating a bug report, providing comprehensive diagnostic information to aid in troubleshooting and performance analysis. Special instructions apply when RxLogger operates in Secure Mode.

Select the method to delete logs based on whether secure mode is enabled:

  • Standard Method (Non-secure) - Send an intent:

    com.symbol.rxlogger.intent.action.RX_BUGREPORT
    
  • Secure Method - Choose one of the following:

    • AppOps (Recommended) - Send an intent from a third-party app:

      com.symbol.rxlogger.intent.action.RX_BUGREPORT 
      
    • App Token - Send an intent with a token from a third-party app, replacing <token-id> with the obtained token (see App Token):

      com.symbol.rxlogger.intent.action.RX_BUGREPORT -e "token" "<token-id>"
      
    • Shell Command - Execute the following command:

      com.symbol.rxlogger.intent.action.RX_BUGREPORT_SHELL
      

Status

This intent alerts the third-party app that RxLogger has successfully generated the bug report. RxLogger issues this acknowledgment once the bug report is generated.

Intent:

    com.symbol.rxlogger.intent.action.RX_BUGREPORT_STATUS