Reputation: 1399
After integrating the IAP in Unity Project, IAP is not initializing in the Repack APK but it is working in UDP APK.
I have used 2.2.2 version Unity Distribution Portal package for In App Purchase. While testing the app in UDP apk, it seems working well. After that, when we upload that apk to Unity dashboard for Repack, the IAP is not initializing(Means can able to see the welcome xxxx, after that nothing happened.)
https://assetstore.unity.com/packages/add-ons/services/billing/unity-distribution-portal-138507
The below code shows the clear picture.
private class InitListener : IInitListener
{
public void OnInitialized(UserInfo userInfo)
{
Debug.Log("[Game]On Initialized succeeded");
Show("Initialize succeeded. Start query inventory."); - It's calling till here.
StoreService.QueryInventory(MPurchaseListener);
_mInitialized = true;
}
public void OnInitializeFailed(string message)
{
Debug.Log("[Game]OnInitializeFailed: " + message);
Show("Initialize Failed: " + message);
}
}
Dependency list:
implementation 'com.huawei.hms:base:5.0.3.300'
implementation 'com.huawei.hms:hwid:5.2.0.300'
implementation 'com.huawei.hms:iap:5.0.4.301'
can any one suggest me to solve the issue. Thanks in advance!
Upvotes: 3
Views: 613
Reputation: 121
Use below the dependencies:
implementation 'com.huawei.hms:ads-lite:13.4.29.303'
implementation 'com.huawei.hms:ads-consent:3.4.30.301'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.huawei.hms:hianalytics:5.1.0.300'
implementation 'com.huawei.agconnect:agconnect-core:1.2.0.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.1.300'
Please follow the unity document for reference.
Upvotes: 0
Reputation: 34007
You could refer to this guide for integrating IAP using the Unity UDP package in the Unity app.
You are advised to re-integrate by referring to each step in above link. If the re-integration still fails and the same problem occurs, pls kindly provide some detailed logs for analysis and investigating the root cause of it.
Upvotes: 1