Share File Sample

Secure Storage Manager 1.1

Overview

Secure Storage Manager (SSM) is a mechanism for securely sharing files and/or data from an originating app to one or more target apps, or to itself. This sample app demonstrates the following:

  • Insert file - securely store the file from the specified source path to SSM. Set the persist flag based on whether the file should persist (true) or not persist (false) through an enterprise reset.
  • Query file - the file content is retrieved based on the target app package name.
  • Update file - securely update the existing file stored in SSM, replacing it with the updated file.
  • Delete file - removes the file and all related data information from SSM.

This sample may be used based on acceptance of the EULA.


Requirements

  • Secure Storage Manager, built into Zebra mobile computers with Android 11 or higher

Download

Download Share Data sample source code.


Using This Sample

  1. Download, build and launch the sample app. image
  2. Tap the dropdown for Persist Flag and select one of the following:
    • true - data persists through an enterprise reset
    • false - data does not persist through an enterprise reset
  3. Create a file named "A.txt" and copy it to the /enterprise/usr folder on the device (for example, using ADB). Make sure the Source Path and File Name field matches with the actual file name and folder.
  4. Keep the default entry in Target Path and File Name. (Optionally, the file name can be changed.)
  5. Tap Insert File. The file is stored in SSM.
  6. Tap Query File. The file information is queried and displayed (below Query Result).
  7. Update file: Edit the file content (from "A.txt"). On the device, replace the file in the source path specified in step 3. Tap Update File. The original file is replaced with the updated file and stored in SSM.
  8. Repeat step 6 to query the updated file and check if the update is successful.
  9. To delete the file, tap Delete File.

See Also