crisp-im/crisp-sdk-android

Cannot resume chat activity whenever user minimize then click launcher icon

edomuhammad opened this issue · 3 comments

Whenever user open my app and then open crisp then minimize it, then user click my app launcher icon, crisp suddenly disappeared, and my app going back to main activity. my expectation is, when user click my app launcher icon, it should be back to crisp not going back to main activity

WhatsApp.Video.2023-05-08.at.14.07.25.mp4

Hi @edomuhammad,

Which version of the SDK are you using?
If you're not using the latest, i.e. 1.0.14, please update it :)

If you're using the latest, have you set your LauncherActivity (the one which starts on the launcher icon tap) to be launched in singleTask or singleInstance mode?
If so, this is the usual behavior, these launch modes do not allow the Activity to be instantiated more than one time in one task. As LauncherActivity creates a new task or resets the current one if already launched, the whole task is reset so only your LauncherActivity remains.

You can see both behavior in the Sample app of this repository and in the Crisp app on the Play Store.

The Sample app has its LauncherActivity launching in standard mode, so tapping the launcher icon just brings back the current task, with the chat running on top if started.

The Crisp app has its LauncherActivity launching in singleInstance mode (for deep links and notifications handling), so tapping the launcher icon creates a new task with our LauncherActivity as it is more like a SplashActivity, re-routing to the correct root Activity or creating a stack (for conversation deep links) then killing itself.

Hi @edomuhammad, did my replies helped you understand your issue?

As this issue is stale, I close it, I let you reopen it if needed ;)