From aa126048206c60291a0e3bb9024542b23abab4af Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Tue, 13 Aug 2019 20:58:47 -0500 Subject: [PATCH] chore: update example to use internal file provider, RN60 autolink works --- example/android/app/build.gradle | 1 - example/android/app/src/main/AndroidManifest.xml | 11 ----------- .../src/main/java/com/example/MainApplication.java | 10 +--------- example/android/app/src/main/res/xml/filepaths.xml | 4 ---- example/android/settings.gradle | 4 +--- 5 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 example/android/app/src/main/res/xml/filepaths.xml diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 26c8b0c9..5c04fdcb 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -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) { diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 4ace0450..d20ebf26 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -23,17 +23,6 @@ - - - - - diff --git a/example/android/app/src/main/java/com/example/MainApplication.java b/example/android/app/src/main/java/com/example/MainApplication.java index a41a37d1..24ed89b3 100644 --- a/example/android/app/src/main/java/com/example/MainApplication.java +++ b/example/android/app/src/main/java/com/example/MainApplication.java @@ -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; @@ -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 @@ -49,10 +47,4 @@ public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); } - - @Override - public String getFileProviderAuthority() { - return BuildConfig.APPLICATION_ID + ".provider"; - } - } diff --git a/example/android/app/src/main/res/xml/filepaths.xml b/example/android/app/src/main/res/xml/filepaths.xml deleted file mode 100644 index f6a4cd09..00000000 --- a/example/android/app/src/main/res/xml/filepaths.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 388b2443..263c9e8c 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -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'