Android Question File Provider - App wont open at all

rodmcm

Active Member
Licensed User
Longtime User
Hi
I included the following alterations to the manifest ( the last I could find on this site) and my app wont open at all. I assume that this is because things have moved on since the alterations where published... Can anyone direct me to a modern update please

B4X:
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" />
)
 

DonManfred

Expert
Licensed User
Longtime User
and my app wont open at all.
What is the full error you got?

Get the full error from the log and post it. There must be an error if the app do not start.

I´ve implemented FileProvider in a lot of Apps and it never resulted in a not starting app.
 
Last edited:
Upvote 0

rodmcm

Active Member
Licensed User
Longtime User
No error log as App doesn't open enough to connect... Bridge connected though. Is the Manifest code above still relevant?
 
Upvote 0

rodmcm

Active Member
Licensed User
Longtime User
I added the class module from the example to my code and it all worked perfectly. Looks like I need to look at the calls to the FileProvider library to see why I'm crashing
 
Upvote 0
Top