Skip to content

Instantly share code, notes, and snippets.

@AntonioDiaz
Last active January 5, 2017 07:36
Show Gist options
  • Save AntonioDiaz/68c9ae303abd3250412ab3813fea5613 to your computer and use it in GitHub Desktop.
Save AntonioDiaz/68c9ae303abd3250412ab3813fea5613 to your computer and use it in GitHub Desktop.
Declare Content Provider and allow access from another app.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.android.sunshine.app">
<application>
<activity>...</activity>
<provider
android:name=".data.WeatherProvider"
android:authorities="com.example.android.sunshine.app"
android:enabled="true"
android:exported="true"
android:permission="com.myapp.OhhhhDiosito">
</provider>
</application>
<permission
android:name="com.myapp.OhhhhDiosito"
android:label="ohhh diosito"
android:protectionLevel="dangerous">
</permission>
</manifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment