Android project stop responding when go background during in app purchase.

Hello. I run purchase flow in java code (billingClient.launchBillingFlow(SDLActivity, billingFlowParams);) through JNI. Android purchase window is opened and next app go to background because i should confirm purchase in my bank app(it go to foreground). After confirm purchase i want to go again to SDL2 android project but that is frozen and not respond.

  1. I know that C++ main() is called from other thread (not thread where java activity running). Can here be problem with different threads?
  2. How should i handle android project with SDL where it goes to background during billingFlow in process?

Here is my app. You can start purchase flow on start screen and move app to background, next try to restore it.