SecurityException with grantUriPermission when sharing a file with FileProvider

Well, after a week and a lot of trial and error, it seems the answer is to not specify permissions. So the App A Manifest should instead contain: <provider android:name=”android.support.v4.content.FileProvider” android:authorities=”au.com.example.AppA.fileprovider” android:exported=”false” android:grantUriPermissions=”true” > <meta-data android:name=”android.support.FILE_PROVIDER_PATHS” android:resource=”@xml/filepaths” /> </provider> ie, I removed the read and write permissions. My initial understanding, and failing to find documentation … Read more

The source was not found, but some or all event logs could not be searched

EventLog.SourceExists enumerates through the subkeys of HKLM\SYSTEM\CurrentControlSet\services\eventlog to see if it contains a subkey with the specified name. If the user account under which the code is running does not have read access to a subkey that it attempts to access (in your case, the Security subkey) before finding the target source, you will see … Read more

Android: java.lang.SecurityException: Permission Denial: start Intent

You have to add android:exported=”true” in the manifest file in the activity you are trying to start. From the android:exported documentation: android:exported Whether or not the activity can be launched by components of other applications — “true” if it can be, and “false” if not. If “false”, the activity can be launched only by components … Read more