Game restarts after sdkbox nativeShare

Hi friends!

I’ve implemented sdkbox nativeShare screenshot image on Android with Cocos Creator. It works fine but when I return to game it restarts. I want to make the game keep alive in the background and resume when I turn back after share.

I’ll be happy if some one can help.

Thanks.

I’ve tried android:alwaysRetainTaskState=“true” on manifest but didn’t help.
Any ideas? @yinjimmy @slackmoehrle or can you direct me some one?
Thanks.

whats your step ?

Test device is Samsung Galaxy Note 2 Android 4.4.2

1 - My game runs on landscape mode.
2 - I hit share button and it captures screen as jpeg image then calls nativeShare.
3 - Share menu opens successfully
Screenshot_2019-11-25-16-04-20
4 - I hit whatsapp and whatsapp opens (orientation changes to portrait during this step)
5 - I share image on whatsapp
6 - I return to game with back button (orientation changes to landscape during this step)
7 - Game restarts from loading screen as if I killed the app and started from home screen.

If I hit back button after step 4 then game resumes the last state but if I complete share and return it kills and restarts from loading screen.

I’ve tried to add android:alwaysRetainTaskState=“true” to activity but didn’t help.

I’ve tested if orientation change kills the app by keeping phone landscape mode during share but result is same.

Thank you very much for the detailed steps.

I’ll try it today.