Android Question Problems with SimpleExoPlayer and FileProvider together

Cadenzo

Active Member
Licensed User
Longtime User
When using VideoRecordApp I need the FileProvider and therefore I need this settings in the ManifestEditor:
B4X:
'for FileProvider:
AddManifestText(<uses-permission
   android:name="android.permission.WRITE_EXTERNAL_STORAGE"
   android:maxSdkVersion="18" />
)
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,
   <files-path name="name" path="shared" />
)

But with this settings I get this error, if there is a SimpleExoPlayerView in the layout:

*** Service (starter) Create ***
Using FileProvider? true
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
...
** Activity (frmvideoplay) Create, isFirst = true **
** Activity (frmvideoplay) Resume **
Error occurred on line: 62 (FrmVideoPlay)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalStateException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
...
** Service (starter) Destroy (ignored)**
** Activity (frmvideoplay) Pause, UserClosed = true **
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…