Hello community,
I'm having trouble using the fileprovider.
I have two functions that use the same FileProvider.
a function launches an intent to display pdf so I declared the path in the editormanifest:
The other function uses the fileprovider to launch the camera of the device with an intent:
The problem is that by declaring both paths in the editormanifest at runtime the system always executes the last declaration, so I get a java.lang.reflect.invocationTargetException error for one of the two functions.
Does anyone know how to index the two functions with different paths?
I'm having trouble using the fileprovider.
I have two functions that use the same FileProvider.
a function launches an intent to display pdf so I declared the path in the editormanifest:
Editormanifest:
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
)
CreateResource(xml, provider_paths,
<external-files-path name="name" path="List/Archivio/" /> 'file path to launch the intent
)
The other function uses the fileprovider to launch the camera of the device with an intent:
Editormanifest:
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
)
CreateResource(xml, provider_paths,
<external-files-path name="name" path="shared" />'Path
)
The problem is that by declaring both paths in the editormanifest at runtime the system always executes the last declaration, so I get a java.lang.reflect.invocationTargetException error for one of the two functions.
Does anyone know how to index the two functions with different paths?