Commit 7c07ddc
committed
android: Fix issue where another instance of app would start on sharing.
This would occur whenever zulip was started by another Activity using
startActivityForResult. Ideally with launchMode="singleTask" zulip
should always launch in a seperate task, this however is not the case,
when it is started via startActivityForResult by another app.
With startActivityForResult another instance of zulip would be
initialized inside the calling app, regardless of the fact that zulip
was in background or not.
This caused problems especially for share to zulip intents and this
commit addresses those cases. Now SEND intent is not captured by
MainActivity, a seperate native activity is created to capture them
and it redirects the intents unchanged to MainActivity by calling
startActivity, hence always ensuring that zulip is launched as a
seperate task. (If zulip was already running and in background, it will
be used instead of creating a new task.)1 parent ee02551 commit 7c07ddc
File tree
2 files changed
+28
-0
lines changed- android/app/src/main
- java/com/zulipmobile
2 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments