Search Unity

Question App restart while purchase ( Android )

Discussion in 'Android' started by Newaxekub, Nov 26, 2022.

  1. Newaxekub

    Newaxekub

    Joined:
    Jan 9, 2014
    Posts:
    4
    This issue occurs with purchases that require opening banking applications or other applications.

    When switching screens to transfer money after coming back to my game It was forced to restart.
    Successful payouts have been paid. But the buyer did not receive the item because the game was forced to restart.

    If the buyer makes a purchase within a fast time When coming back in sometimes the game will not restart.
    and the transaction will be successful
    But if the buyer takes too long to buy After returning there is a high chance that the game will restart.

    This is my video


    I try to use Application.runInBackground = true; But the problem still hasn't been solved.


    This is my AndroidManifest.xml file
    Code (JavaScript):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0">
    4.   <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
    5.  
    6.   <uses-permission android:name="android.permission.INTERNET" />
    7.   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    8.   <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    9.   <uses-permission android:name="com.google.android.gms.permission.AD_ID" />
    10.  
    11.   <application android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:icon="@drawable/app_icon" android:label="[USER=7078]@String[/USER]/app_name" android:debuggable="false">
    12.  
    13.     <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="[USER=7078]@String[/USER]/app_name" android:clearTaskOnLaunch="false" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
    14.       <intent-filter>
    15.         <action android:name="android.intent.action.MAIN" />
    16.         <category android:name="android.intent.category.LAUNCHER" />
    17.        <action android:name="android.intent.action.VIEW" />
    18.        <category android:name="android.intent.category.DEFAULT" />
    19.        <category android:name="android.intent.category.BROWSABLE" />
    20.       </intent-filter>
    21.       <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    22.       <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
    23.     </activity>
    24.  
    25.    <activity
    26.             android:name="com.unity3d.ads.adunit.AdUnitActivity"
    27.             android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
    28.             android:hardwareAccelerated="true"
    29.             android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
    30.    <activity
    31.        android:name="com.unity3d.ads.adunit.AdUnitSoftwareActivity"
    32.        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
    33.        android:hardwareAccelerated="false"
    34.        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
    35.  
    36.     <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    37.     <activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    38.     <activity android:name="com.facebook.unity.FBUnityGamingServicesFriendFinderActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    39.     <activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" />
    40.     <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" />
    41.     <activity android:name="com.facebook.unity.FBUnityGameRequestActivity" />
    42.     <activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" />
    43.     <activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" />
    44.     <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="*************************" />
    45.     <meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="true" />
    46.     <meta-data android:name="com.facebook.sdk.AdvertiserIDCollectionEnabled" android:value="true" />
    47.     <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.***********************" android:exported="true" />
    48.   </application>
    49.   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    50.   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    51. </manifest>
    52.  
    Please help me thanks.
     
    Last edited: Nov 26, 2022
    ritesh_khokhani likes this.
  2. Newaxekub

    Newaxekub

    Joined:
    Jan 9, 2014
    Posts:
    4


    This is the video the player sent me.
    Most of the players are able to purchase,
    but less than 10% of players have this problem.

    I've tested everything and no problems. But some players have this problem.
     
    ritesh_khokhani likes this.