My Project
|
Add a buddy from a directory outside of the navigator file system. More...
Variables | |
static final int | MSG_RI_ADD_BUDDY_FROM_EXTERNAL_DIR = 905 |
Add a buddy from a directory outside of the navigator file system.
Add a buddy to the system. Position the buddy with MSG_RI_POSITION_BUDDY. The buddy will be shown by a png file and a name on the map. This method works on all Android versions, please use this in future implementations instead of MSG_RI_ADD_BUDDY.
The client software must use a FileProvider to grant access to the file.
Adding a buddy is done by using the android FileProvider class to be able to grant the foreign navigator app access to files of this client (needed for Android 10/11). The steps to grant a permission is as following:
If wanted, you can revoke the permission after the navigator sent back the response that the buddy was added (the navigator will copy the bitmap to a temporary folder in the navigator namespace to be able to access it, and therefore it is save to revoke the permission after the navigator response).
For implementation details, please see the RITest demo app.
Key | Value | Type | Info |
---|---|---|---|
Bitmap | Bitmap file to represent the buddy on the map. | String | |
Name | An optional name that is written below the buddy bitmap on the map | String |
Key | Value | Type | Info |
---|---|---|---|
BuddyId | Id of the added buddy | int |
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_IS_INITIALIZING if the Remote Interface service is not initialized yet.
RI_ERROR_FILE_ACCESS if the file could not be loaded (either because of not granted permissions or of other load error). RI_ERROR_FAILED if an error occurred.
© PTV Group 2021 | Generated on Sun Oct 2 2022 19:28:23 for My Project by 1.8.17 |