Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.reactnativestripesdk">
package="com.reactnativestripesdk">

<application>
<activity
Expand All @@ -19,21 +19,21 @@
android:excludeFromRecents="true"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="stripe-connect"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="stripe-connect" />
</intent-filter>
</activity>

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.stripe.fileprovider"
android:name=".StripeFileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.reactnativestripesdk

import androidx.core.content.FileProvider

/**
* Empty subclass of [FileProvider] used so this library's provider has a unique
* [android:name] in the manifest. That prevents the manifest merger from merging
* this provider with another library's FileProvider,
* which would cause an "Attribute provider@authorities value=... is also present at..."
* conflict.
*/
class StripeFileProvider : FileProvider()
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ class StripeSdkModule(
val uri =
androidx.core.content.FileProvider.getUriForFile(
reactApplicationContext,
"${reactApplicationContext.packageName}.stripe.fileprovider",
"${reactApplicationContext.packageName}.fileprovider",
file,
)

Expand Down