App icon indicating copy to clipboard operation
App copied to clipboard

Hybrid Android - App shows splash screen every time launching after backgrounding app

Open IuliiaHerets opened this issue 1 year ago β€’ 12 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.67-1 Reproducible in staging?: N Reproducible in production?: N If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N Issue reported by: Applause Internal Team

Action Performed:

  1. Launch hybrid app.
  2. Open any report.
  3. Background the app (not quit the app).
  4. Relaunch the app.

Expected Result:

App will not show splash screen every time launching after backgrounding app.

Actual Result:

App shows splash screen every time launching after backgrounding app.

Issue reproducible on hybrid app only.

Workaround:

Unknown

Platforms:

  • [ ] Android: Standalone
  • [x] Android: HybridApp
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Standalone
  • [ ] iOS: HybridApp
  • [ ] iOS: mWeb Safari
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/933e8805-9a59-4160-9dcd-565d575d7caa

View all open jobs on GitHub

IuliiaHerets avatar Nov 27 '24 07:11 IuliiaHerets

Triggered auto assignment to @MonilBhavsar (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] avatar Nov 27 '24 07:11 melvin-bot[bot]

πŸ’¬ A slack conversation has been started in #expensify-open-source

melvin-bot[bot] avatar Nov 27 '24 07:11 melvin-bot[bot]

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] avatar Nov 27 '24 07:11 melvin-bot[bot]

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

github-actions[bot] avatar Nov 27 '24 07:11 github-actions[bot]

@MonilBhavsar this seems like a minor issue, maybe not a deploy blocker?

jliexpensify avatar Nov 27 '24 07:11 jliexpensify

Agree, this does not need to be a blocker

MonilBhavsar avatar Nov 27 '24 09:11 MonilBhavsar

Thanks both, I'm going to take this one as @war-in and I have been working on related issues.

Julesssss avatar Nov 27 '24 09:11 Julesssss

Hi πŸ‘‹ I've been working on deeplinks and have some insights on why the BootSplash is visible when clicking on the app icon on Android.

When the deeplinks arrived we had to switch to singleTask launch mode on both HybridApp activities

  • ExpensifyActivityBase, which is OD activity;
  • and ReactNativeActivity, which is ND activity.

The ExpensifyActivityBase is marked as a launcher activity so it's being opened as the first one each time the user clicks on the icon, even if the ReactNativeActivity was on top. That means if we want to show the NewApp we need to bring the activity to the front by sending a new intent.

Why do we need BootSplash here? When the icon is clicked the OD activity is shown and then ND is brought to the front. We need to show BootSplash to hide this behaviour

war-in avatar Nov 27 '24 11:11 war-in

Thanks. So the next question is why we must use singleTask. Perhaps there are alternatives solutions that allow deep links to remain working? Or is there some detail that prevents us from alternative deep link handling?

Julesssss avatar Nov 27 '24 13:11 Julesssss

@Julesssss Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Dec 03 '24 09:12 melvin-bot[bot]

When I used the standard launch mode, it resulted in two instances of the app. An additional activity was created on top of the app that opened the deep link.

To address this, I switched to singleTask mode. This ensures only one activity instance exists, and any new intent reuses the existing instance instead of creating a new one.

Since NewDot also uses the singleTask launch mode, I believe we should align with it for consistency

war-in avatar Dec 03 '24 16:12 war-in

Thank you for the explanation. When I have a moment I want to look into the Activity <> App structure. But for now I'll downgrade to weekly.

Julesssss avatar Dec 04 '24 13:12 Julesssss

@Julesssss this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Dec 11 '24 09:12 melvin-bot[bot]

I'm not going to have time to look into alternative Activity launch modes, but the splash screen is quite annoying and we should see if there is an alternative solution/

Julesssss avatar Dec 11 '24 10:12 Julesssss

Still on the backlog for further investigation from SWM team.

Julesssss avatar Jan 03 '25 10:01 Julesssss

Same as above

Julesssss avatar Jan 15 '25 01:01 Julesssss

Is currently low priority.

Julesssss avatar Jan 27 '25 23:01 Julesssss

@Julesssss I think it's resolved on the main already (after the deeplinks PR removal). Once we migrate to fragment the issue shouldn't occur anymore

war-in avatar Jan 28 '25 10:01 war-in

That's great, thanks. I'll keep this low priority for now.

Julesssss avatar Jan 28 '25 19:01 Julesssss

Hi πŸ‘‹ just letting you know that the migration to fragment PRs have been merged, so the issue should not be reproducible anymore

war-in avatar Feb 06 '25 11:02 war-in

Hi πŸ‘‹ just letting you know that the migration to fragment PRs have been merged, so the issue should not be reproducible anymore

That's great, thanks.

Julesssss avatar Feb 06 '25 23:02 Julesssss

This issue has not been updated in over 15 days. eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

melvin-bot[bot] avatar Mar 04 '25 10:03 melvin-bot[bot]

@Julesssss I think we can close this one, because it's not relevant since the fragments and deeplinks PRs

war-in avatar Mar 04 '25 10:03 war-in

Thanks for pointing that out @war-in, closing

Julesssss avatar Mar 04 '25 18:03 Julesssss