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 Files sample source code.
Using This Sample
- Download, build and launch the sample app.
- 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
- Create a file named "A.txt" (the file name can be changed) 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. - Keep the default entry in Target Path and File Name, which represents the package name of the target app (accessing the deployed file) followed by
/
and the application-specific file path. (This is the same as Target Application File Definition setting in FileMgr). The application-specific file path contains the optional path/folder name and file name of a file to be retrieved by the target application. - Tap one of the following based on the method to insert the file:
- Insert File - the file is stored in SSM based on the specified Source Path and File Name.
- Insert File with FileProvider - the file is stored in SSM based on the specified Source Path and File Name converted to the content URI by FileProvider.
- Tap Query File. This queries SSM for any file that targets the specified target app package. The file information is displayed (below Query Result).
- 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.
- Repeat step 6 to query the updated file and check if the update is successful.
- To delete the file, tap Delete File.