SDKBox Share Not showing Dialog when adding image

SDKBox Share Not showing Dialog when adding image
0

#1

Hi,

When adding an image to SDKBox Share (Cocos2dx JS 3.17), the share dialog does not show in Android.

It works on older SDKs.

I have plugin version v2.3.2.0 installed (updating breaks the gradle). I found that I might need to add the provider settings …

    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.sdkbox.test.app.fileprovider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/file_paths" />
    </provider>

but also
sdkbox::PluginShare::setFileProviderAuthorities("your.app.bundleid.customstring");

However, in which file do I add the last line?

Also, am I supposed to add an XML resource likes it says in the Android documentation and will it work on my older version of the Share plugin?

Thanks for your help in advance,


#2

could you plz show the error message ?

let’s ask @htlxyz for this issue.


#3

the authorities in follow two place should be same.

<provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="REPLACE.WITH.YOUR.BUND.ID.fileprovider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/file_paths" />
    </provider>
sdkbox::PluginShare::setFileProviderAuthorities("REPLACE.WITH.YOUR.BUND.ID.fileprovider");

you can take a look at follow sample: