Hey, I have 2 applications (different signing keys...
# android
m
Hey, I have 2 applications (different signing keys) which I want to have secure content provider between these 2 apps, I researched and the conclusion was using permission like below:
Copy code
<permission
        android:name="com.example.myapplication.READ_PERMISSION"
        android:protectionLevel="signature|knownSigner"
        android:knownCerts="@raw/known_certs"
        tools:targetApi="s" />
The content provider works if I write it like
Copy code
<permission
        android:name="com.example.myapplication.READ_PERMISSION" />
But if I use
knownSigner
then I get below error:
Copy code
java.lang.SecurityException: Permission Denial: opening provider com.example.myapplication.CustomProvider from ProcessRecord{c4924bb 23886:<http://package.name/u0a701|package.name/u0a701>} (pid=23886, uid=10701) requires com.example.myapplication.READ_PERMISSION or com.example.myapplication.READ_PERMISSION
not kotlin but kotlin colored 4
stackoverflow 1
And this is how
known_certs.xml
looklike
Copy code
<?xml version="1.0" encoding="utf-8"?>
<certificates>
    <certificate>
        <alias>androiddebugkey</alias>
        <sha1>SHA1 CODE</sha1>
    </certificate>
</certificates>