I’ve implemented UDP in a couple of my games, and managed to make builds for e.g., Huawei App Gallery, which is super nice! But how can I make a build for Google Play? Or do I need to implement Unity IAP and remove the UDP implementation to get my apps into Google Play?
Even just a Google Play compatible .apk would be fine, I can manually do the Google Play submission…
that’s the same question i have with it!
thats a nice question hope get answered
Is good play even supported?
Perhaps you can consider Unity IAP so you can choose different target platforms.
Please check the “With Unity IAP” part in this doc: Games with In-App Purchases | Unity Distribution Portal | 1.3.1-preview.1
The assets store link of Unity IAP: https://assetstore.unity.com/packages/add-ons/services/billing/unity-iap-68207
Does this mean that it’s pretty silly to implement UDP to your app when implementing IAP does the same and offers more?
Hi villeHelin,
If you want to release your game to Google Play Store and UDP, we are normally recommend you to use Unity IAP SDK and in this case you won’t need to manage 2 sets of IAP items in your project.
You just need to make sure to change your target as the screenshot above and implement the related callbacks will do.
This doesn’t seem to work: If I do an IAP validation in ProcessPurchase() of IAP implementation, and export that code as UDP, then the UDP seems to fail always (as the validator only uses Google Play and iOS App Store Tangle Data). How can I make a single IAP implementation that will work with Google Play, iOS App Store, and all the UDP stores UDP supports? Please help!
Also I find this a little tedious, do we have to build twice the same .aab (or apk) and upload one of them to the UDP Portal and the other one to the Google Play Store?
Weird, the main store (Google Play) is not supported via UDP as well, so yeah I guess we have to make 2 builds manage GP and UDP-stores separate.
There’s a mess in my head about this UDP. Is this for distributing your app at once, or for calling API that unifies the IAP transactions? If I don’t have any IAP, do I still get any advantages using UDP? Moreover, the UDP console requires me to call IAP functions in sandbox even if I don’t have IAP calls. Why? Or it’s not needed at all?
The documentation says:
- First, be sure to create UDP Sandbox Test accounts. You can do this in the section directly below, or in the Unity Editor.
- Run your UDP APK on an emulator or a real Android device.
- Use your UDP Sandbox Test account credentials to log in.
- Launch your game. This will call the Initialize() method in your game code.
- If your game has IAP items, make at least one IAP transaction. This will call the Purchase() method in your game code. It’s a sandbox environment, no real money is involved!
- You will see the results during your sandbox testing, and UDP will also capture the results on its back-end.
My questions:
-
In point #2: what is UDP apk? Is it my game built? Or it’s a specific apk file that comes with the UDP SDK?
-
Log in? Where? My game does not want the user to log in. Or is it another apk (see question #1)?
-
What does Sandbox environment mean? Even if I log in, why will it be a sandbox if I had an IAP in my app? What differentiates the sandbox IAP call from a non sandbox?
-
Since a while Google Play Store requires devs to upload an .aab, not an .apk. UDP console, though, wants me to upload an apk. Why? How can UDP solve the “distribute at once” approach this way?
Huuuuge mess here, sorry, but quite a few stuff don’t make sense to me.
You will need to implements the initialize and callback methods for UDP SDK. The flow are mostly similar to IAP SDK, just with different callback methods.
https://docs.unity3d.com/Packages/com.unity.purchasing.udp@2.0/manual/games-with-iap.html#init
You are correct. You are still required to export the separate build for Google Play Store as UDP is still not support for it yet.
- UDP apk is the exported apk with UDP SDK integrated.
- This is the Sandbox login. It’s for verify you have integrated UDP SDK properly within your project. You can create a Sandbox login account in Unity Editor’s UDP Settings or in the UDP Console.
- The UDP apk you exported from Unity editor will be under Sandbox environment. It’s mainly for your own testing. After everything is work as expected you will need to repack this apk for different stores.
- UDP is not support Google Play Store yet. Because of most of the store is not support for .aab, we are using the .apk for submission.
So it is still a little unclear. If we want to support Google Play and UDP stores, should we:
A) Implement UDP and select the “Unity IAP > Android > Google Play” option to build an IAP non-UDP build for Google Play? Then switch it to UDP to build the UDP version.
B) We have to opt for Unity IAP instead and use the same “Unity IAP > Android > Google Play” / “UDP” option to create the two builds required?
All the UDP docs seems to say to use the newest UDP method but doesn’t mention any way to support Google Play. We obviously want the easiest least error-prone approach to still publish to Google Play or iOS. We also don’t want to implement IAP and then be told to switch everything to UDP later. Is it A or B and do they work with just that simple switch?
In your case if you already have implemented Unity IAP SDK for your game, you can use the method B) which set different target for Unity IAP so that exported APK can be use for Google Play Store (Target Google Play) or UDP (Target UDP). Basically you won’t need to change your Unity IAP code with this method.