Search Unity

Welcome to the Xiaomi Platform Forum!

Discussion in 'Xiaomi' started by Buhlaine, Jul 11, 2017.

  1. Buhlaine

    Buhlaine

    Community Manager

    Joined:
    Feb 5, 2016
    Posts:
    348
    XiaomiForumHeader.png

    As you know Unity has recently partnered with Xiaomi in order to provide easy access to android game publishing in China!
    This partnership will allow Unity developers to access Xiaomi’s 200 million active users!

    For more information please check the Xiaomi platform partner page [link].
    If you’re ready to get started, please refer to our technical guide [link].

    As you work to publish your game in China with Xiaomi, and encounter any issues, please post here and Daisy Ke, Overseas Business Manager at Xiaomi Game Center, will be able to help!
    For any Unity-specific technical questions, please feel free to post here for community support.
     
    Mauri likes this.
  2. XMGame

    XMGame

    Official Xiaomi Employee

    Joined:
    Apr 20, 2017
    Posts:
    3
    Hello everyone, this is Daisy from Xiaomi. If you have any questions about how to bring your games to China, please feel free to post here.
     
    hippocoder likes this.
  3. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    hi Daisy, nice to have a official forum here, i see the Xiaomi is still in early access, i ve been asking asking for it but didn t hear from it, my question is would it be possible to publish an android game if it s already live on google play?

    thanks
     
  4. XMGame

    XMGame

    Official Xiaomi Employee

    Joined:
    Apr 20, 2017
    Posts:
    3
    Hi. Yes. The developer portal will go live soon. For now, to proceed, please send more information about your game and a test apk (if possible) to overseas-game@xiaomi.com.

    Thanks.
     
    Last edited: Jul 17, 2017
  5. funx

    funx

    Joined:
    Jun 9, 2014
    Posts:
    16
    We're interested in publishing our early childhood education game for kids in mainland China. I'm not sure exactly what category this would best suit? I couldn't find a specific Educational category. Also, it'd be great to have info on the technical aspects of Unity's IAP and how/what will be supported by the Xiaomi platform. In particular I'd like to know if subscriptions (monthly) are supported and do they have some kind of receipt verification system to check whether our users' subscriptions are still valid or whether they've been cancelled.
     
  6. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @funx
    Xiaomi has a "Kids&Puzzles" category. You can choose this one.

    Once you sign up for early access, Xiaomi will send you an email to offer some integration materials.
    If you have some technical questions, just reply that email and you'll get support from Xiaomi and Unity.

    At present, Xiaomi doesn't have subscription products. Consumable and Non-Consumable products are supported.
    Xiaomi IAP has local validation and server side validation.
    You can find more information from this link. https://unitytech.github.io/channel/
     
    Mauri likes this.
  7. funx

    funx

    Joined:
    Jun 9, 2014
    Posts:
    16
    Thank you for your quick and concise answers! It's a shame that subscriptions aren't supported, do you know if there are plans to introduce it?
     
  8. funx

    funx

    Joined:
    Jun 9, 2014
    Posts:
    16
    And one other question, is it compulsory to have Xiaomi submit our app for Chinese government approval on our behalf? The cost of that is 35,000 RMB which is expensive. If we can get the approval done ourselves/with our Chinese partners, and we provide the ISBN/require documents/numbers, then I'm hoping we can skip having to pay this fee.
     
  9. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @funx
    Currently, Xiaomi doesn't have a clear plan for supporting subscriptions.

    If you can get the approval done on your side, you can skip this step with Xiaomi.
    For release things, You can contact with Xiaomi for more detailed information.

    Hope my answers are helpful for you.
     
    funx likes this.
  10. funx

    funx

    Joined:
    Jun 9, 2014
    Posts:
    16
    Thank you, they were very helpful!
     
  11. HaileyHurt

    HaileyHurt

    Joined:
    Aug 6, 2016
    Posts:
    5
    Is this service currently active?
    So if we sent an email with an APK to overseas-game@xiaomi.com with a ready-to-launch game it could be published soon?
     
  12. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @HaileyHurt
    If you want to publish your game to Xiaomi, please sign up here for early access: https://unity.mi.com/
    Then our friends in Xiaomi will help with next steps.
    There are some information you need to submit.
     
  13. HaileyHurt

    HaileyHurt

    Joined:
    Aug 6, 2016
    Posts:
    5
    Thank you. I have already done this step but I suppose maybe it takes a while to hear back.
     
  14. thxu2

    thxu2

    Joined:
    Jan 12, 2016
    Posts:
    33
    Hi, i have problem with xiaomi permission on android 5.1, record audio, when i skip special xiaomi permission, While (Microphone.getpos()<1) {} work wrong never false, how can i disable this permission, it should have permission on game install before android 6.1? but dosnt.
     
  15. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @thxu2
    Xiaomi SDK and Unity IAP don't require recording audio permission.
    The permission for recording audio in Android is android.permission.RECORD_AUDIO.
    If you don't want it, you can delete it in AndroidManifest.xml.
     
  16. Lagranges

    Lagranges

    Joined:
    Sep 20, 2017
    Posts:
    1
    emmm....sdk在哪下载啊,话说回来大家都可以拿到资格吗。
    表示版号真麻烦,unity宣传似乎是说小米会帮忙弄,具体是什么情况啊。
     
  17. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @Lagranges ,
    Unity IAP目前已经支持Xiaomi IAP了,您可以直接集成Unity IAP。
    这个链接是Unity IAP的手册:https://docs.unity3d.com/Manual/UnityIAP.html
    这个链接是Xiaomi IAP的常见问题和一些文档链接:https://forum.unity.com/threads/xiaomi-iap-faqs.487225/
    在这个链接中可以提交申请:https://unity.mi.com/
    版号这块小米会帮您申请,目前看是没有什么问题的。
    提交申请后小米会给您发送相关邮件,到时候您可以咨询更详细的信息。
     
  18. DTAli

    DTAli

    Joined:
    Jan 22, 2016
    Posts:
    54
    @unityjingyao I'm trying to make a build of our game to submit to the Xiaomi/mi store.

    I'm a little bit confused as to how I make a product purchase call.

    The examples here, https://unitytech.github.io/channel/stand-alone-xiaomi-sdk-doc/#client-side-integration

    say to use PurchaseService.Purchase("Product ID", "Game Order ID", myPurchaseListener);

    but in the IAPDemo.cs it uses Unity Purchasing to make the purchase via m_Controller.InitiatePurchase

    I'm confused. Do I *NEED* to use Unity IAP to make a purchase? or PurchaseService.Purchase? What's the difference?
     
  19. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @kholiobungholio
    PurchaseService.Purchase() is an API in stand-alone Xiaomi SDK.
    m_Controller.InitiatePurchase() is an API in Unity IAP.

    The stand-alone Xiaomi SDK isn’t integrated to Unity IAP and just include Xiaomi Store SDK.
    If you only need to publish your game to Xiaomi Store, you can use this SDK.

    If you are using Unity IAP already and want to use same IAP code as other App Stores, you should use Unity IAP.
    Unity IAP has Xiaomi IAP integrated since v1.12.0.
    Check the changelog here:
    https://forum.unity3d.com/threads/u...-1-13-1-is-now-available.415517/#post-3160929

    Preliminary documentation:
    https://docs.google.com/document/d/1VjKatN5ZAn6xZ1KT_PIvgylmAKcXvKvf4jgJqi3OuuY
    https://unitytech.github.io/channel...ty-sdk-for-xiaomi-alpha-v0.0.16-iap-guide.pdf

    Xiaomi IAP FAQs:
    https://forum.unity.com/threads/xiaomi-iap-faqs.487225/
     
  20. DTAli

    DTAli

    Joined:
    Jan 22, 2016
    Posts:
    54
    @unityjingyao Thanks for the reply.

    - So if I use the latest Unity IAP, it already has Unity Channel in it? And there's no need for me to download any packages or SDKs from Xiaomi website?

    - About the product catalog, the docs says to use the Unity IAP Catalog to add products, I also read somewhere that this is only for 'debug' mode (AppInfo.debug=true), is it only for debug or release too? Cause we've been in contact with the Xiaomi guys and they said they have our products configured on the developer portal.

    - Do we have to call StoreService.Login before StoreService.Initialize?

    This is what I currently have (a simplified version), is that all I need to implement? if you don't mind taking a look it'd be apprecated [Pastebin Link]

    EDIT: Forgot about the purchasing code, it's in the XStoreListener

    Code (csharp):
    1.  
    2.  
    3.     public void BuyProduct(string ProductId)
    4.     {
    5.         try
    6.         {
    7.             if (IsInitialized)
    8.             {
    9.                 Product Item = StoreController.products.WithID(ProductId);
    10.                 if (Item != null && Item.availableToPurchase)
    11.                 {
    12.                     Debug.Log(string.Format("[Services] Purchasing product (asyncronously): '{0}'", Item.definition.id));
    13.                     OnPurchaseBegin.SafeInvoke();
    14.                     StoreController.InitiatePurchase(Item);
    15.                 }
    16.             }
    17.         }
    18.         catch (Exception e)
    19.         {
    20.             Debug.LogError("[Services] Exception during purchase. " + e);
    21.         }
    22.     }
    23.  
    24.  
     
  21. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @kholiobungholio
    Yes, the latest Unity IAP already has UnityChannel in it. You don't need to download any package else.

    Adding products in IAP Catalog is a necessary step for both debug and release. You need to export all your products to "MiGameProductCatalog.prop" file. Unity IAP will read it during initialization and you'll be required to upload it to developer portal to configure your products on Xiaomi side after the portal is released.

    StoreService.Initialize should be called before StoreService.Login. You can refer to IAPDemo.cs.
    Both StoreService.Initialize and StoreService.Login are asynchronous.
    I didn't run your code but I didn't see any problem after scanning it. You can give it a try.
    If you only use this code for Xiaomi, I think it should be OK.
    If you want to use a unified code for all app stores you need to support, IAPDemo.cs is a good practice.
     
  22. DTAli

    DTAli

    Joined:
    Jan 22, 2016
    Posts:
    54
    Thanks for your fast replies!

    - In the Product Catalog, do I need to set the override ids for the products? We set the "ID" (product id, e.g. tr_goldbundle_0) but not the override values. Do we need to set those too, or do those have a default value?

    - After I close the product catalog it doesn't save a .prop file, it saves a .json file under UnityPurchasing/Resources. If I hit "App Store Export | Xiaomi Mi Game Pay Catalog", it asks me where do I want to save the file, I'm not sure where to put it?
     
  23. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @kholiobungholio
    Unity IAP has unified API for different app stores, so if you have unified product id that'll be easier to buy a product.
    Sometimes, you might not be able to have same product id in app stores. You can use "Store ID Overrides" to input your store specific id.
    If your product id you input in "ID" field is same as Xiaomi product id, you don't need to override it in "Store ID Overrides". You can just leave it blank.

    You need to hit "App Store Export | Xiaomi Mi Game Pay Catalog" to export your products.
    One prop file is saved to "Assets/Plugins/Android/assets", and it'll be packaged into apk/assets.
    The prompt is to let you choose a place to save a copy. This copy will be uploaded to developer portal.(The portal is coming soon) The default path is the root folder of your Unity project.
    That json file has all values in IAP Catalog, please just leave it there.
     
  24. DTAli

    DTAli

    Joined:
    Jan 22, 2016
    Posts:
    54
    @unityjingyao So I saved it to the project root, and it generated 2 'extra' copies (not just one) under Plugins/Android/assets, one copy is MiGameProductCatalog.prop, and the other is MiProductCatalog.prop. Is that normal?
     
  25. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  26. DTAli

    DTAli

    Joined:
    Jan 22, 2016
    Posts:
    54
    @unityjingyao I see, thank you! One more question, you mentioned the new Unity IAP has built-in support for Xiaomi, is that just for purchasing, or social authentication as well? In otherwords, can I still use "Social.localUser.Authenticate(Handler)" to sign in, or do I still have to implement the "UnityChannel ILoginListener" interface and call "StoreService.Login(Listener)" directly instead?
     
  27. DTAli

    DTAli

    Joined:
    Jan 22, 2016
    Posts:
    54
    @unityjingyao There doesn't seem to be a way to "Import" from a ProductCatalog.prop file? We updated our Unity purchasing and my product catalog window is reset, it lost all its settings. But I do have the .prop files under Plugins/Android/assets.
     
  28. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @kholiobungholio
    Sorry for the late reply.
    Unity IAP has nothing to do with Social.
    "UnityChannel ILoginListener" is necessary for Xiaomi IAP and you should call "StoreService.Login(Listener)" to login Mi account.

    We don't support "Import" from a prop file currently.
    Could you please tell me how to reproduce the Catalog window reset issue? I've never seen this issue.
    The data you inputted in Catalog window was saved in "Assets/Plugins/UnityPurchasing/Resources/IAPProductCatalog.json".
    If you upgraded Unity IAP via importing unitypackage file directly, this file should be overwritten.
     
  29. Nick62

    Nick62

    Joined:
    Jan 30, 2017
    Posts:
    11
    is fee about USD5277 ??
    35 000RMB?

    Should we pay it in any case?

    Where can we see algorithm of game publishing from the begining to end?

    In what period should we pay a fee? after game approval or before?
     
  30. XMGame

    XMGame

    Official Xiaomi Employee

    Joined:
    Apr 20, 2017
    Posts:
    3
    Hi @Nick62, could you send those questions to Overseas Game Support <overseas-game@xiaomi.com>? Our team will provide more details. Thanks.
     
  31. BDCJR

    BDCJR

    Joined:
    Apr 25, 2013
    Posts:
    19
    Hello to everyone! I read that is possible to publish apps using in app purchases technology and free ones, but is not mentioned the possibility to publish paid games on MI Game Center. Thank you.
     
  32. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @BDCJR Xiaomi App Store doesn't support paid games yet, but they're working on it.
    Xiaomi SDK for paid games will be released soon. Once it's released, we'll integrate it in Unity IAP as soon as possible.
     
  33. michdesj

    michdesj

    Joined:
    Dec 28, 2015
    Posts:
    2
    Hi,

    What is the fee in USD for publishing on Xiaomi? Is this fee required for every App publishing?
     
  34. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  35. kapyar

    kapyar

    Joined:
    Dec 13, 2014
    Posts:
    8
    Does someone had already published game to Mi Store? If yes could you please share your data, DAU/MAU ARPU, ARPPU. And what about Unity Ads how it perform what is eCMP? Thanks
     
  36. lolchampionmanager

    lolchampionmanager

    Joined:
    Mar 15, 2017
    Posts:
    2
    Hi, just a question:
    "The current fee is RMB 35,000"
    This mean (aprox) 5438$? or 5.43$?

    Thanks in advance.
     
  37. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  38. Hiten2012

    Hiten2012

    Joined:
    Dec 12, 2014
    Posts:
    14
    I am from India. If i wants to publish my game to xiaomi store. Whats legal procedure (about ISBN) i needs to do.
    In India ISBN is not eligible for Video game (https://www.isbn.org/faqs_isbn_eligibility)
    From where and how i can get ISBN number for video game?
     
  39. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @Hiten2012
    If you want to release your games on Xiaomi app store, Xiaomi will help you get an ISBN number in China.
    Please send an email to overseas-game@xiaomi.com for more insight about ISBN.
     
  40. Hiten2012

    Hiten2012

    Joined:
    Dec 12, 2014
    Posts:
    14
    Had already send email them (at overseas-game@xiaomi.com) before a week. Till now not any reply.
    anyway thank YOU.
     
  41. michdesj

    michdesj

    Joined:
    Dec 28, 2015
    Posts:
    2
    Hi,

    Would like to know if any indie have published on Xiaomi, and if so what are your comment.
     
  42. DirtyFredd

    DirtyFredd

    Joined:
    Jan 9, 2018
    Posts:
    3
    Hi, i wanted to find the xiaomi marketplace. Does it have a webpage like https://play.google.com/store ? Because apparently i cant find the marketplace. Thank you in advance.
     
  43. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  44. abhishekrt1995

    abhishekrt1995

    Joined:
    May 16, 2018
    Posts:
    1
    Hi, I am from India, How do i add my account to xiaomi app store and upload an app using api instead of ui?

    Thanks in advance.
     
    Last edited: May 16, 2018
  45. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @abhishekrt1995 ,
    You can use Unity account to login Xiaomi Dev Portal.
    I'm sorry that we don't offer an API to upload an app. The only way to upload app currently is via Cloud Build.
     
  46. moldywarpe

    moldywarpe

    Joined:
    Jan 18, 2017
    Posts:
    31
    Hi,
    I am interested in porting our application to MiVR standalone and then adding to the MiVR store. Our application currently supports GearVR and Oculus Go.
    We are currently on Unity 2017.4 and we do not have any in-app purchases.
    I have read thru a lot of documentation about this process but it is somewhat confusing...
    So, a few queries:
    1. Do I need to add any MiVR SDK to our application? (Note: I imported the custom package mivrcore_1_8_2.unityPackage and now the Oculus OVRManager amongst others are broken :( )
    2. What current Oculus features are incompatible?
    3. Is a fee required to publish and promote on the MiVR store. I have seen 35000RMB mentioned but as an indie developer this is way out of our league currently.

    Thanks for your help.
     
  47. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @moldywarpe ,
    I'm sorry that I'm not familiar with Mi VR development.
    Xiaomi offers some documentation, but more of them are Chinese only.
    https://dev.mi.com/console/doc/detail?pId=862
    There are some English FAQs available here.
    https://dev.mi.com/console/doc/detail?pId=1240
    If you have any tech questions, please email to mivr-dev@xiaomi.com.

    These pages might also help.
    http://vr.mi.com/developer/
    https://www.mi.com/en/mivr/developer/
    https://forums.oculusvr.com/developer/discussion/60986/developing-for-new-mi-vr-standalone

    Regarding the fee and promotion, please send an email to overseas-game@xiaomi.com for more insight.
     
    moldywarpe likes this.
  48. Martin_Gonzalez

    Martin_Gonzalez

    Joined:
    Mar 25, 2012
    Posts:
    361
    Is this forum still alive?
     
    moldywarpe likes this.
  49. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  50. zippro

    zippro

    Joined:
    Dec 13, 2013
    Posts:
    7
    Hello. We are getting some problem while creating business account on mistore. Can you help us?
    Thanks @unityjingyao