Follow

How do I build for different Android stores?

Symptoms

  • I am unable to change the Store that Unity IAP targets.
  • I would like to switch (for example) from Google Play to Amazon Appstore?

Cause

You wish to use the correct app store when using the IAP service within your game.

Resolution

Manually set the Android store (aka “Android Flavor”) using the Window > Unity IAP > Android > Target Amazon menu item.

Or programmatically call UnityPurchasingEditor.TargetAndroidStore():

using UnityEngine;

using System.Collections;

using UnityEngine.Purchasing;

public class Example : MonoBehaviour {

        void SetAndroidStoreTarget ()

    {

        UnityPurchasingEditor.TargetAndroidStore(AndroidStore.AmazonAppStore);

    }

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Rachit Jain

    For me it doesn't show select store at runtime option in the submenu.

    Refer to the screenshot below:

  • 0
    Avatar
    Ben

    Hi Rachlt,

    Yes, I will need to update this article.

    After speaking with a colleague I was told that the menu option is gone, but the example code in the following forum post works.

    https://forum.unity3d.com/threads/set-android-iap-target-on-rumtime.435790/

    If you have any further questions please send us a support ticket via the analytics dashboard.

     

Please sign in to leave a comment.