File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
android/src/main/java/com/meedan Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,21 @@ public void getSharedText(Callback successCallback) {
93
93
return ;
94
94
}
95
95
96
- Intent intent = currentActivity .getIntent ();
96
+ //if this isn't the roor activity then make sure it is
97
+ if (!currentActivity .isTaskRoot ()) {
98
+ Intent newIntent = new Intent (currentActivity .getIntent ());
99
+ newIntent .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK );
100
+ currentActivity .startActivity (newIntent );
101
+
102
+ ReadableMap shared = extractShared (newIntent );
103
+ successCallback .invoke (shared );
104
+ clearSharedText ();
105
+ currentActivity .finish ();
106
+ return ;
107
+ }
97
108
109
+ Intent intent = currentActivity .getIntent ();
110
+
98
111
ReadableMap shared = extractShared (intent );
99
112
successCallback .invoke (shared );
100
113
clearSharedText ();
You can’t perform that action at this time.
0 commit comments