PTV Navigator Remote Interface Documentation
|
Variables | |
final int | MSG_RI_LOAD_PROFILE_FROM_EXTERNAL_DIR = 404 |
Import a profile file from an external directory
Copies a profile file to the profiles directory of the Navigator (normally located under /sdcard/Android/data/com.ptv.navigation.app/files/profiles/) and reinitializes the profiles list. A file with the same name in the profiles directory will be overwritten by this function.
Attention: The client software must use a FileProvider to grant access to the file.
Copying the profile 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). The steps to grant a permission is as following:
<provider android:name="androidx.core.content.FileProvider" android:authorities="com.ptvag.navigation.ritest.fileprovider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/filepaths"></meta-data> </provider> *
For more implementation details, please see the RITest demo app.
The visited flags of the destination stops will also be set as found.
Key | Value | Type | Info |
---|---|---|---|
FileName | The name of the profile file with path as uri | String |
*
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
RI_ERROR_INVALID_PARAMETER if the sent bundle which should hold the file name is null
RI_ERROR_FILE_ACCESS if the file name is null or empty or the file could not be copied (either because of not granted permissions or of other copy error).
© PTV Group 2023 | Generated on Fri May 10 2024 10:16:00 for PTV Navigator Remote Interface Documentation by 1.7.3 |