|
--- android/app/build.gradle 2022-10-29 11:38:29.000000000 +0200 |
|
+++ share-extension/android/app/build.gradle 2022-10-29 11:12:16.000000000 +0200 |
|
@@ -339,6 +339,8 @@ |
|
} else { |
|
implementation jscFlavor |
|
} |
|
+ |
|
+ implementation project(':reactnativereceivesharingintent') |
|
} |
|
|
|
if (isNewArchitectureEnabled()) { |
|
--- android/settings.gradle 2022-10-29 11:38:29.000000000 +0200 |
|
+++ share-extension/android/settings.gradle 2022-10-29 11:12:16.000000000 +0200 |
|
@@ -15,3 +15,6 @@ |
|
include(":ReactAndroid:hermes-engine") |
|
project(":ReactAndroid:hermes-engine").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid/hermes-engine"); |
|
} |
|
+ |
|
+include ':reactnativereceivesharingintent' |
|
+project(':reactnativereceivesharingintent').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-receive-sharing-intent/android') |
|
--- android/app/src/main/java/com/example/exposhareintentdemo/MainActivity.java 2022-10-29 11:54:18.000000000 +0200 |
|
+++ share-extension/android/app/src/main/java/com/example/exposhareintentdemo/MainActivity.java 2022-10-29 11:12:16.000000000 +0200 |
|
@@ -2,6 +2,7 @@ |
|
|
|
import android.os.Build; |
|
import android.os.Bundle; |
|
+import android.content.Intent; |
|
|
|
import com.facebook.react.ReactActivity; |
|
import com.facebook.react.ReactActivityDelegate; |
|
@@ -80,4 +81,10 @@ |
|
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; |
|
} |
|
} |
|
+ |
|
+ @Override |
|
+ public void onNewIntent(Intent intent) { |
|
+ super.onNewIntent(intent); |
|
+ setIntent(intent); |
|
+ } |
|
} |
|
--- android/app/src/main/AndroidManifest.xml 2022-10-29 11:54:18.000000000 +0200 |
|
+++ share-extension/android/app/src/main/AndroidManifest.xml 2022-10-29 11:12:16.000000000 +0200 |
|
@@ -21,8 +21,16 @@ |
|
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="46.0.0"/> |
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/> |
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/> |
|
- <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/xxx-xxx-xxx-xxx-xxx"/> |
|
- <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustPan" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait"> |
|
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/xxx-xxx-xxx-xxx-xxx"/> |
|
+ <activity |
|
+ android:name=".MainActivity" |
|
+ android:label="@string/app_name" |
|
+ android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" |
|
+ android:launchMode="singleTask" |
|
+ android:windowSoftInputMode="adjustResize" |
|
+ android:theme="@style/Theme.App.SplashScreen" |
|
+ android:exported="true" |
|
+ android:screenOrientation="portrait"> |
|
<intent-filter> |
|
<action android:name="android.intent.action.MAIN"/> |
|
<category android:name="android.intent.category.LAUNCHER"/> |
and share intent (app.json)
and kotlin 1.6 (app.json):