@digitalmoka had the same issue, but was solved - as he stated - through using the java code listed before.
he is the original poster of that code BTW.
I had the same issue too with 2018.3.12 and with 2018.3.13. It runs once without problems but when you exit and restart the App, IAP is not initialized. No problems with 2018.3.11 and beforeā¦
The fix from digitalmoka worked for me but not for everoneā¦
See thread 1 (last posts) for more information about this subjectā¦
See thread 2 for Error: called non-existent method System.Boolean UnityEngine.VR.VRSettings::get_enabledā¦
See thread 3 for not working solution (in my case)ā¦
The API Updater doesn't run automaticly with 2019.1.0, I have to trigger it myself with some deprecated code. I followed all steps to delete and import the folders several times but I was NOT able to get IAP running, I get the thread 2 Error all the time...
Iām using Easy Mobile Pro for Ads and IAP, everything works fine with 2018.3.11 and before. I noticed (on iOS) when a restore event was triggered, a purchase completed event is triggered after the restore event too wich triggers an Error. Android doesnāt need to Restore so restore is disabled on Androidā¦
I solved this issue with a simple bool (canPurchase) to disable purchasing after a restore event and than IAP works without a problem, I just tell this to be completeā¦
Upgrading a project with IAP to a new Unity version should be simple and should always work, we depend on good functionallity for Ads and IAP, that should never cause so many problems, just my $0,02ā¦
this one worked for me, as it donāt quit the app it just send it back to the background.
I think this is a very good temp solution, until we got a fix
System.Diagnostics.Process.GetCurrentProcess().Kill(); and Application.Quit(); are placed outside the Coroutine, because I think the Coroutine is Killed before or during Apllication.Quit(); is executed (Stack Trace Previous Post)ā¦
Mono is not a durable option, [read the details here](https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html)...
i have the same problem, with unity 2018.3.13 and 2019.1.2
The only thing for me works is killing the process from java overriding the main activity with a extension of unityplayeractivity and onDestroy of the activity put this
now unity close and java call this an close the process before it shows the leaking serviceconnection and we i start the game again the iap and google play games is working.
I solved it by making a native plugin( .aar ) which just executes exit(0) in Java.
It works pretty well but Iām just worried that Playerpref wont work out since it saves user data when Application.Quit is executed.
Wait whattttt??? Iām having this issue, it took me a whole day to find out it was Unityās bug.
And I cant use
āSystem.Diagnostics.Process.GetCurrentProcess().Kill()ā
Throwing this Exception:
System.ComponentModel.Win32Exception (0x80004005): Success
06-14 20:58:45.173 15192 15234 E Unity : at System.Diagnostics.Process.GetProcessHandle (System.Int32 access, System.Boolean throwIfExited) [0x00000] in <00000000000000000000000000000000>:0
06-14 20:58:45.173 15192 15234 E Unity : at System.Diagnostics.Process.Kill () [0x00000] in <00000000000000000000000000000000>:0
06-14 20:58:45.173 15192 15234 E Unity : at Exit.Quit () [0x00000] in <00000000000000000000000000000000>:0
06-14 20:58:45.173 15192 15234 E Unity : at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0
06-14 20:58:45.173 15192 15234 E Unity : at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
06-14 20:58:45.173 15192 15234 E Unity : at UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke (T1 handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <00000000000000000000000000000000>:0
06-14 20:58:45.173 15192 15234 E Unity : at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0
06-14 20:58:45.173 15192 15234 E Unity : at UnityEngine.E