Skip to content

Commit

Permalink
chore: update example to use internal file provider, RN60 autolink works
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Aug 30, 2019
1 parent 4849290 commit aa12604
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 28 deletions.
1 change: 0 additions & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(':react-native-share')
implementation "com.facebook.react:react-native:+" // From node_modules

if (enableHermes) {
Expand Down
11 changes: 0 additions & 11 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import android.app.Application;

import cl.json.ShareApplication;

import com.facebook.react.PackageList;
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
import com.facebook.react.bridge.JavaScriptExecutorFactory;
Expand All @@ -14,7 +12,7 @@

import java.util.List;

public class MainApplication extends Application implements ReactApplication, ShareApplication {
public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
Expand Down Expand Up @@ -49,10 +47,4 @@ public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}

@Override
public String getFileProviderAuthority() {
return BuildConfig.APPLICATION_ID + ".provider";
}

}
4 changes: 0 additions & 4 deletions example/android/app/src/main/res/xml/filepaths.xml

This file was deleted.

4 changes: 1 addition & 3 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
rootProject.name = 'example'
include ':react-native-share'
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../../android')

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'

0 comments on commit aa12604

Please sign in to comment.