Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[Released] Ultimate Mobile Pro

Discussion in 'Assets and Asset Store' started by lacost, Oct 19, 2018.

  1. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    No, sorry I don't know any workaround that will allow using android.support and androidX in the same project. But I am pretty sure that the latest Facebook SDK is using androidX.

    Here is a bit more info a toghts about this problem.
    https://forum.unity.com/threads/released-ultimate-mobile-pro.571465/page-7#post-4944080

    Cheers!
     
  2. adamfulop

    adamfulop

    Joined:
    Sep 8, 2019
    Posts:
    3
    Thank you for the quick answer! Updating the Unity Jar Resolver plugin solved the issue!
     
    lacost likes this.
  3. lilboylost

    lilboylost

    Joined:
    Feb 12, 2014
    Posts:
    265
    I am not using Unified Analytics. I am only using Google Analytics old plugin which use measurement protocol. If I don't initialise anything via pro analytics, does it still send any auto events to any analytics? I want to make sure that I am not sending user data to various analytics platform.
     
  4. lilboylost

    lilboylost

    Joined:
    Feb 12, 2014
    Posts:
    265
    Hey @lacost

    I am trying to turn your your asset analytics service but not able. I have also remove unity analytics package from package manager. I am using firebase (using google sdk) and google analytics using your old plugin.
    Why can't I turn off the whole analytics service?


     
  5. Nemo_omeN

    Nemo_omeN

    Joined:
    Aug 28, 2019
    Posts:
    12
    Hey @lacost
    Thanks for Your package with the tvOS fix for GameCenter (ios_native_2019.17b4.unityPackage).
    Unfortunately, it's still getting us the same result, we get the info that the login was successfull, but blank user id, display name, alias etc. (no info about GC login of any kind visible to the user as well). We've retested it on iOS and it still works as expected there. We've upgraded Unity to 2018.4.8 if that's related in any way.
    Please advise. Is there any additional setup required for tvOS? Do we need to update the entire Ultimate Mobile plugin as well (we've only imported the unity package You've sent us)?

    Thanks in advance.
     
  6. KrcKung

    KrcKung

    Joined:
    Jul 18, 2017
    Posts:
    31
    Alright, thanks for the effort.
     
  7. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    There is no need to turn it off.

    I probably need to change the spelling from On to Available. This state only indicates that the plugin has found some 3rd party analytics services in your project it can work with. But nothing will happen until you explicitly use unified analytics API or enable automatic reporting in settings.
     
  8. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    No, it should work. I am sorry to hear that it wasn't working for you, I will double-check tomorrow, and if I will not able to find an issue then I hope we can have a touch base and investigate what exactly is going wrong on your side. Thank you.
     
  9. escic

    escic

    Joined:
    Aug 6, 2013
    Posts:
    35
    hi lacost, thanks for your works. I have a strange situation when cancel a purchase flow on Google Android.
    I use a AC to test a online purchase product. This AC was not set a payment method. So after the purchase flow start, a pop-up is show some options to let me set a new payment method. When I ignore(closed) these pop-up. It suppose to be cancel the purchase flow and back to my game interface. But when I do this. Nothing feedback event fire from UM_TransactionObserver. That make my game hold on a purchase flow and I can't back to my game.
    This is not a big issues, but it would be good if i can make it cancel normally.
     
  10. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Interesting. I will try to reproduce this and let you know :) I am assuming you are using latest Asset Store plugin version?
     
  11. escic

    escic

    Joined:
    Aug 6, 2013
    Posts:
    35
    Yes thanks you, i use version 2019.17
     
  12. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Hey, @escic thank you for your report. Turns out it was a legit bug on my side.
    Android in-app client will only fire OnTransactionUpdated if Android transaction will have product info.
    However for some cases, like the one you described Android will not provide product info.

    Fix: failed transaction update will be fired even if there is no product info associated with it.
    The updated plugin version will be available in the Asset Store tomorrow.
     
  13. Jinthree

    Jinthree

    Joined:
    Jul 7, 2017
    Posts:
    13
    Hello. Thanks for provide great asset for developers.

    I need full error code list for every main API(such as Authentication API, Saved Games API) to display various localized text for user. I hard to find every possible error code mean, because error code almost show as int fields.
     
  14. escic

    escic

    Joined:
    Aug 6, 2013
    Posts:
    35
    Thanks you, this is great!
     
  15. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    So for the Unified API this is quite hard to make. But if you are talking about specific platfrom you can get all the possible code by exploring documentation.
    I know that may sound a little bit odd, but give me please a function example that may return an error with code and I will provide you with the flow how possible code variations can be found per platfrom.
     
  16. Jinthree

    Jinthree

    Joined:
    Jul 7, 2017
    Posts:
    13
    Okay, I'm working with document so...

    Code (CSharp):
    1. using SA.CrossPlatform.GameServices;
    2. ...
    3.  
    4. var client = UM_GameService.SignInClient;
    5. client.SingIn((result) => {
    6.     if(result.IsSucceeded) {
    7.         Debug.Log("Player is signed");
    8.     } else {
    9.         Debug.Log("Sing in failed: " + result.Error.FullMessage);
    10.     }
    11. });
    This is sample code in document, and it similar to mine. According to code above,
    result
    has
    Error
    indicate information of error, and write debug message if failed to sign in. I should show proper message to user and handle it for each error. For example, if user cancel to sign in then I no need to show the error message because that was not error actually, that was user's choice. If error was about network, I need to show message to user like 'Network is unstable. Please check the network state and try again.'. So, I need to know what error code can occurred in API; In this case, UM_GameService.SignInClient.SingIn() function.

    I know there is another way. Just repeat test and find out various error myself, or explore whole source code involved with API. But it waste of time and I possibly lost some cases also.
     
    Last edited: Sep 16, 2019
  17. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    @Jinthree I totally understand the reasoning.
    For the most application, there is no need to be super detailed in what kind of error you can get if sing in was failed. Also please note that unified API is also a simplified one. That will provide you with less complicated API and will try to resolve most of the common cases for you.

    But for advanced application this may not be enough, that's why you also can use native API provide buy iOS Native plugin and Android Native plugin directly. UM Is just a cross platfrom wrapper around those platforms.

    Now here is the way how you can get all possible error codes.
    Android.
    Here is Android Native plugin Sing In flow:
    https://unionassets.com/android-native-pro/android-games-sing-in-679#performing_silent_sign-in
    Code (CSharp):
    1.  
    2. using SA.Android.GMS.Auth;
    3. ...
    4.  
    5. AN_GoogleSignInOptions.Builder builder = new AN_GoogleSignInOptions.Builder(AN_GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN);
    6. builder.RequestId();
    7. builder.RequestEmail();
    8. builder.RequestProfile();
    9.  
    10. AN_GoogleSignInOptions gso = builder.Build();
    11. AN_GoogleSignInClient client = AN_GoogleSignIn.GetClient(gso);
    12. AN_Logger.Log("SignInNoSilent Start ");
    13.  
    14. client.SilentSignIn((signInResult) => {
    15.     AN_Logger.Log("Sign In StatusCode: " + signInResult.StatusCode);
    16.     if (signInResult.IsSucceeded) {
    17.         AN_Logger.Log("SignIn Succeeded");
    18.         UpdateUIWithAccount(signInResult.Account);
    19.     } else {
    20.         AN_Logger.Log("SignIn filed: " + signInResult.Error.FullMessage);
    21.     }
    22. });
    23.  
    As you may expect AN_GoogleSignInClient & AN_GoogleSignInResult are equal calsses to official GoogleSignInClient and GoogleSignInResult.
    So let's take a look at google GoogleSignInResult references. We can find that the provided error code can be found inside the CommonStatusCodes + according to documentation the only portion of those codes can be applicable to the sing in, and that portion is located at GoogleSignInStatusCodes

    Then we can check if AN_CommonStatusCodes is existed in the plugin (and it does + has all the codes listed on documented ) Or take a look inside the AN_GoogleSignInResult, and you will even find a helper function inside:
    Code (CSharp):
    1. /// <summary>
    2. /// An object indicating the status of the sign in attempt.
    3. /// </summary>
    4. public AN_CommonStatusCodes StatusCode {
    5.       get {
    6.           if (Error != null) {
    7.               return (AN_CommonStatusCodes) Error.Code;
    8.           } else {
    9.               return AN_CommonStatusCodes.SUCCESS;
    10.           }
    11.       }
    12. }
    This may seem as complicated flow, but it's really not. The reason is as an Asset Store developer I can't compete with the level of details and refinement in documentation with Apple and Google.

    But what I want is for you to be able to use Web & official Google & Apple documentation and then apply that knowledge to the plugin code.
    Because in the end of the day you don't give a flip about learning some 3rd party software, but learning how to workin directly with google or apple API can be a valuable experience for you + it's will be super simple to tell me if something is missing.

    Let me know what you think :)
    And yes the same flow for iOS leads us to
    Code (CSharp):
    1.  
    2. ISN_GKLocalPlayer.Authenticate(result =>
    3. {
    4.       if (result.IsSucceeded)
    5.       {
    6.             ...
    7.       }
    8. });
    9.  
    And then to Apple GKLocalPlayer
    The native authentication-related events are providing you with NSError - not very specific. So there is now well-defined codes for apple, but we can see that Apple provides us with two common errors that can be received by your game

    • Receiving a GKErrorGameUnrecognized error means that you have not enabled Game Center for your app in App Store Connect. Sign in to your App Store Connect account and verify that your app has Game Center enabled. Also, confirm that the bundle identifier in your Xcode project matches the bundle identifier you assigned to your app in App Store Connect.

    • Receiving a GKErrorNotSupported error means that the device your game is running on does not support Game Center. You should disable all Game Center related features.
    Then we can look up int codes of those errors, those codes are 15 and 16.
    I hope it was helpful. Also if you see the room for improvements, please do not hesitate to share your opinion.
     
  18. Jinthree

    Jinthree

    Joined:
    Jul 7, 2017
    Posts:
    13
    @lacost

    Oh, I completly understand what you mean; the cross-platform problem, unified API, things of rely on Google and Apple, so on. I got enough knowledge from your answer, so I can continue my work.

    I also understand I should know inside of it, if want more details. but, I belive that well-documented API explain possible input and output of functions.

    Thanks for your reponse; detailed and fast!
     
    lacost likes this.
  19. Nemo_omeN

    Nemo_omeN

    Joined:
    Aug 28, 2019
    Posts:
    12
    @lacost thanks for the new Ultimate Mobile package (2019.18).
    I installed it as clean install (removed all folders and files from Plugins/StansAssets except the Settings folder) and then imported the unityPackage.

    First thing that we noticed is that the plugin no longer moved the files properly from the StansAssets/NativePlugins/IOSNativePro/XCode to StansAssets/NativePlugins/IOSNativePro/XCodeDisabled (and vice-versa) when enabling/disabling the GameKit in the iOSNativePro setting window. I had to move the files (and remove the txt extension myself for Unity to recognise the files as libs) otherwise the project wouldn't compile in XCode with missing classes.

    Secondly, in a similar manner, the plugin didn't add the GAME_KIT_API_ENABLED define to the tvOS platform when I enabled/disabled the GameKit in iOSNativePro settings window - I had to manually add it there myself.

    Thirdly, we tried to run the login code again and it still gave us the same result (empty id, alias etc.). Then, it turned out that the CrossPlatfom code didn't link the proper platform specific clients properly (ex. UM_iSignInClient). The reason for that turned out to be the lack of the proper tvOS platform enum at points when the code decides which implementation to use (iOS and tvOS are separate platform for Unity and have different RuntimePlatform enums!).

    This is an example of how to fix it:
    upload_2019-9-16_17-48-9.png

    So, I searched all places where the RuntimePlatform was used and added the tvOS platform in the places where iOS was defined. After that point the login did return a proper id and we probably could gain achievements, write to leaderboards etc.

    Fourthly, we need the SaveGame API implementation as well, but we saw that it's disabled for tvOS in the GameKit lib source files. We find out the reason for that is that GKSavedGame is not supported on tvOS yet, but we need it (the cloud api in general) to store player saves in the cloud. On the other hand, CloudKit api is avaliable on tvOS and it's an Apple recommended way of storing files larger than 1MB on the cloud. The question is do You have an CloudKit implementaion somewhere already (and can simply use that instead of GameKit save games api on tvOS) or do You plan to support it shortly (have it on Your release plan for example)?

    Without the cloud saves the player experience would be really subpar to the iOS one and, to be honest, it's kind of a deal breaker for us.

    Thanks in advance for Your response and continous support. :)
     
  20. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    91
    Hi,
    After unpacking support for Playmaker, one action in particular threw an error:

    Code (CSharp):
    1. Assets/StansAssets/Addons/PlayMakerAddon/Actions/GameServices/UM_ShowAchievementsUI.cs(13,47): error CS7036: There is no argument given that corresponds to the required formal parameter 'callback' of 'UM_iAchievementsClient.ShowUI(Action<SA_Result>)'
    Asset: ultimate_mobile_2019.17b5

    Any idea how I can correct that? A little edit at line 13 that I can quickly do?
     
  21. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Fixed it :) You can just remove an addon and then download it again, it will grab the updated version.
    Also I might need to add an update button in the UI :)
     
  22. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Hey, @unity_7moAds8QlnETMw Thanks for your report.

    So for the first 2 issues, I am pretty sure those are supposed to work correctly. So if we can have a call and you can demonstrate it I would really appreciate this.

    For the 3rd one - yes you are right I need to fix that, and I will right now.

    For the TvOS and Saved games, I am also looking forward that Apple will add support for that.
    CloudKit could be an alternative, yes, but that's a pretty huge API, and not much of the developer will take advantage for that, at least because of 2 things.

    1. It requires learning a lot about CloudKit before you can use it properly.
    2. There is no cross platfrom analog.

    CloidKit was a part of an old plugin but then I removed it since nobody actually uses it. With that said, I don't think I will be adding it back anytime soon.
     
  23. Nemo_omeN

    Nemo_omeN

    Joined:
    Aug 28, 2019
    Posts:
    12
    @lacost we've moved on to using a different plugin for iCloud CloudKit for iOS and tvOS instead of GameService Save Game feature (we still use GameService for all other GameCenter related stuff). Thanks for the info, though. :)

    We do have 2 other issues regarding the GameService on tvOS:
    1. We can view the achievements UI (by calling UM_GameService.AchievementsClient.ShowUI) only once, the second and any other time the view simply don't show up and we don't get any callback (not even a fail one).

    There is an exception during the first ShowUI call, but we still get a success callback after that:
    upload_2019-9-19_12-35-42.png

    And in second and any other calls the log looks like this:
    upload_2019-9-19_12-37-39.png

    It doesn't matter if we want to view leaderboards or achievements. After the first, successfull, time we can't view it anymore.

    2. If we try to show the leaderboards page (by calling UM_GameService.LeaderboardsClient.ShowUI), it still takes us to the achievements page. I can see the difference in m_viewState parameter when we call the different ShowUI methods (0 for leaderboards and 1 for achievements), so it's clearly a native lib issue.

    Here's a log from the first (any second one is broken) call to the UM_GameService.LeaderboardsClient.ShowUI:
    upload_2019-9-19_12-44-11.png

    Let me know if You need anything else from us to fix this. Many thanks for Your continuous support. ;)
     
  24. neowedge

    neowedge

    Joined:
    May 6, 2014
    Posts:
    9
    Hi! I wrote to Google as soon as I read this, but I hadn't any answer yet (that's why I didn't answer to you: I was waiting for Google). I saw you change something in the TransactionUpdate. I'll try it again in a couple of days with the new version, and I'll try to communicate again with Google or provide to you more information next time ;).

    Thanks!
     
  25. Jinthree

    Jinthree

    Joined:
    Jul 7, 2017
    Posts:
    13
    Hi, I ran into some issue.

    I using Ultimate Mobile and I installed Google Admob SDK. I implement adsvertisement feature not via Ultimate Mobile, but via Admob API directly to use my custom mediation for Admob network. I use Ultimate Mobile for authentication, saved games, analytics, some native dialog features.

    I applied proguard settings and I built my project use gradle with gradle settings. Then I ran into following issue.

    Code (JavaScript):
    1. 09-22 20:04:10.043 25989 26016 E Unity   : java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;
    2. 09-22 20:04:10.043 25989 26016 E Unity   :      at com.stansassets.core.utility.AN_UnityBridge.GetGson(AN_UnityBridge.java:73)
    3. 09-22 20:04:10.043 25989 26016 E Unity   :      at com.stansassets.core.utility.AN_UnityBridge.toJson(AN_UnityBridge.java:68)
    4. 09-22 20:04:10.043 25989 26016 E Unity   :      at com.stansassets.android.util.AN_Locale.GetDefault(AN_Locale.java:25)
    5. 09-22 20:04:10.043 25989 26016 E Unity   :      at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    6. 09-22 20:04:10.043 25989 26016 E Unity   :      at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    7. 09-22 20:04:10.043 25989 26016 E Unity   :      at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:88)
    8. 09-22 20:04:10.043 25989 26016 E Unity   :      at android.os.Handler.dispatchMessage(Handler.java:102)
    9. 09-22 20:04:10.043 25989 26016 E Unity   :      at android.os.Looper.loop(Looper.java:214)
    10. 09-22 20:04:10.043 25989 26016 E Unity   :      at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    I found answer in web; Add 'Gson' package manually in gradle settings. Like :
    implementation 'com.google.code.gson:gson:2.8.5'


    Here is my current gradle settings.

    Code (JavaScript):
    1. // GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
    2.  
    3. buildscript {
    4.     repositories {
    5.         google()
    6.         jcenter()
    7.     }
    8.  
    9.     dependencies {
    10.         classpath 'com.android.tools.build:gradle:3.4.0'
    11. **BUILD_SCRIPT_DEPS**}
    12. }
    13.  
    14. allprojects {
    15.     repositories {
    16.         google()
    17.         jcenter()
    18.         flatDir {
    19.             dirs 'libs'
    20.         }
    21. //################################################################
    22.         maven {
    23.             url 'https://maven.google.com'
    24.         }
    25. //################################################################
    26.     }
    27. }
    28.  
    29. // Android Resolver Repos Start
    30. ([rootProject] + (rootProject.subprojects as List)).each {
    31.     ext {
    32.         it.setProperty("android.useAndroidX", true)
    33.         it.setProperty("android.enableJetifier", true)
    34.     }
    35. }
    36. ([rootProject] + (rootProject.subprojects as List)).each { project ->
    37.     project.repositories {
    38.         def unityProjectPath = "file:///" + file(rootProject.projectDir.path + "/../../").absolutePath
    39.         maven {
    40.             url "https://maven.google.com"
    41.         }
    42.         maven {
    43.             url "https://maven.google.com/" // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
    44.         }
    45.         mavenLocal()
    46.         jcenter()
    47.         mavenCentral()
    48.     }
    49. }
    50. // Android Resolver Repos End
    51. apply plugin: 'com.android.application'
    52. **APPLY_PLUGINS**
    53.  
    54. dependencies {
    55.     implementation fileTree(dir: 'libs', include: ['*.jar'])
    56. //################################################################
    57.     implementation 'com.google.code.gson:gson:2.8.5'
    58. //################################################################
    59. // Android Resolver Dependencies Start
    60.     implementation 'com.google.android.gms:play-services-ads:18.1.1' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
    61. // Android Resolver Dependencies End
    62. **DEPS**}
    63.  
    64. // Android Resolver Exclusions Start
    65. android {
    66.   packagingOptions {
    67.       exclude ('/lib/arm64-v8a/*' + '*')
    68.       exclude ('/lib/armeabi/*' + '*')
    69.       exclude ('/lib/mips/*' + '*')
    70.       exclude ('/lib/mips64/*' + '*')
    71.       exclude ('/lib/x86/*' + '*')
    72.       exclude ('/lib/x86_64/*' + '*')
    73.   }
    74. }
    75. // Android Resolver Exclusions End
    76. android {
    77.     compileSdkVersion **APIVERSION**
    78.     buildToolsVersion '**BUILDTOOLS**'
    79.  
    80.     compileOptions {
    81.         sourceCompatibility JavaVersion.VERSION_1_8
    82.         targetCompatibility JavaVersion.VERSION_1_8
    83.     }
    84.  
    85.     defaultConfig {
    86.         minSdkVersion **MINSDKVERSION**
    87.         targetSdkVersion **TARGETSDKVERSION**
    88.         applicationId '**APPLICATIONID**'
    89.         ndk {
    90.             abiFilters **ABIFILTERS**
    91.         }
    92.         versionCode **VERSIONCODE**
    93.         versionName '**VERSIONNAME**'
    94.     }
    95.  
    96.     lintOptions {
    97.         abortOnError false
    98.     }
    99.  
    100.     aaptOptions {
    101.         noCompress = ['.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**]
    102.         ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    103.     }**SIGN**
    104.  
    105.     buildTypes {
    106.         debug {
    107.             minifyEnabled **MINIFY_DEBUG**
    108.             useProguard **PROGUARD_DEBUG**
    109.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
    110.             jniDebuggable true
    111.         }
    112.         release {
    113.             minifyEnabled **MINIFY_RELEASE**
    114.             useProguard **PROGUARD_RELEASE**
    115.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
    116.         }
    117.     }**PACKAGING_OPTIONS****SPLITS**
    118. **BUILT_APK_LOCATION**
    119. **EXTERNAL_SOURCES**
    120.     bundle {
    121.         language {
    122.             enableSplit = false
    123.         }
    124.         density {
    125.             enableSplit = false
    126.         }
    127.         abi {
    128.             enableSplit = true
    129.         }
    130.     }
    131. }**SPLITS_VERSION_CODE****REPOSITORIES****SOURCE_BUILD_SETUP**
    132.  
    I built my project again, and I got following error.

    Code (JavaScript):
    1. 09-22 20:09:21.604 27562 27597 E Unity   : AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GoogleApiAvailability;
    2. 09-22 20:09:21.604 27562 27597 E Unity   : java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GoogleApiAvailability;
    3. 09-22 20:09:21.604 27562 27597 E Unity   :      at com.stansassets.gms.common.AN_GoogleApiAvailability.IsGooglePlayServicesAvailable(AN_GoogleApiAvailability.java:16)
    4. 09-22 20:09:21.604 27562 27597 E Unity   :      at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    5. 09-22 20:09:21.604 27562 27597 E Unity   :      at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    6. 09-22 20:09:21.604 27562 27597 E Unity   :      at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:88)
    7. 09-22 20:09:21.604 27562 27597 E Unity   :      at android.os.Handler.dispatchMessage(Handler.java:102)
    8. 09-22 20:09:21.604 27562 27597 E Unity   :      at android.os.Looper.loop(Looper.java:214)
    9. 09-22 20:09:21.604 27562 27597 E Unity   :      at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    I think all dependencies for Ultimate mobile is missing.
    Should I add all dependencies myself?

    upload_2019-9-22_20-38-35.png

    But there is no about 'com/google/android/gms/common/GoogleApiAvailability' also.
     
    Last edited: Sep 22, 2019
  26. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Hey @unity_7moAds8QlnETMw, you did everything correctly.

    In terms of not being able to show Achievements or Leaderboards UI - well, that's another surprise from apple.
    .viewState and .leaderboardIdentifier are not available on tvOS
    https://developer.apple.com/documentation/gamekit/gkgamecenterviewcontroller?language=objc
    You can only open the main GameCenter page.

    The reason for this is because in TvOs Game Center represented as one page, combining achievements and leaderboards.

    But getting leaderboards to be displayed on that page could be a little bit tricky, here is what I found:

    The issue is not the API however, the tvOS Apple documentation (needs to be updated!!?)
    To get the Leaderboards to show up:
    1. Achievements and Leaderboards are merged into a single GameCenter view, with the Leaderboards shown above the achievements.
    2. For tvOS adding the Leaderboards to the GameViewController is all about the Image Assets.
    3. You must add a "+ -> GameCenter -> New Apple TV Leaderboard (or Set)." to your Image Asset.
    4. You must set the "Identifier" for this Leaderboard asset to exactly what your identifier is for each of your leaderboards.
    Apple TV Human Interface Guidelines for the Game Center Images
    https://developer.apple.com/design/...nes/tvos/icons-and-images/game-center-images/


    For the issue, you were experiencing when trying to open GC view the second time. Yep, that was on me, I will send you an updated version.
     
  27. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Out of curiosity, any info about it?
     
  28. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Hey @Jinthree , sorry for slow replay.
    So the way the plugin is provided there are 2 options for the libraries
    1. You can use libs provided with the plugin
    2. You can enable Jar Resolver (recommended) - in this case, the plugin will feed dependencies to the resolver and resolver will download all the required libs.

    According to your log, you are right. And on the screenshot, there is a list of current dependencies that are required by the plugin. Based on plugin settings it will use build it libs or will feed those dependencies to the resolver.

    This class is part of the google play libs that were listed on your plugin UI screenshot.

    Now since you are using the proguard. Sorry, what is that? I hear about it several times already, and everybody have the same issue as you are. Is this some custom build configuration that overrides how Unity will include libs into the apk?

    Long story short you need to make sure that all plugin libs & depresses are included. I believe you can do this by proguard configuration. But I would really like to have a guide for the future customers how to do that since it seems like more an more users are using it.

    Once of the customers reported that he was able to solve the problem using this:
    https://unionassets.com/android-native-pro/proguard-845

    Looking forward to hearing from you, if you were able to solve the project configuration issue.
     
  29. Jinthree

    Jinthree

    Joined:
    Jul 7, 2017
    Posts:
    13
    Thanks for your reply. I waited for you.

    Proguard is obfuscation feature in Android system. In my post, That mean the text file that include settings for Proguard. The text file can include list of declaration what should be not obfuscate. If we use some library that use identifier-class, field, and others- directly like 'Reflection' feature, we need to keep some identifier.

    I'm using IL2CPP, so Proguard is activate when I build android platform.

    I using Android dependency resolver by Google; part of Admob SDK. The resolver automatically resolve-download libraries and so on like resolver in Ultimate Mobile- but I seem disabled when I choose Gradle build system; actually when turn on the custom Gradle setting. When I turn on Gradle custom setting, Gradle setting file generated and all library files are deleted. I think that mean I should declare dependencies in Gradle setting file myself, but I can't believe they not provide automatic way. Anyway, the ads library included definitely!
    implementation 'com.google.android.gms:play-services-ads:18.1.1' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
    Where is others? hmmm...

    I'll try add all dependencies in Gradle setting. Than I'll post result. But I think it should be include automatically if Ultimate Mobile also provide automatic resolve feature.
     
    Last edited: Sep 25, 2019
  30. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Yes, you need to make sure that Jar Resolver support is active, here is a guide on how to do that:
    https://unionassets.com/android-native-pro/unity-jar-resolver-669#using-with-android-native

    Then the dependencies XML file will be generated.
    I've just added a bit more helper UI for the future version, so you can regenerate the dependencies (by default file will be generated during build preprocess) and Open Ultimate Mobile Android dependencies file:
    xx.png

    In the meantime, you can find this file at:
    Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Editor/Dependencies/AN_Dependencies.xml

    Just to make sure all the defenses are declared correctly.
     
    Jinthree likes this.
  31. Jinthree

    Jinthree

    Joined:
    Jul 7, 2017
    Posts:
    13
    The issue is solved!

    The build works after I added all dependencies. So, I was quite certain that problem is in resolver. I executed 'Force Resolve', and now I can see all dependencies in Gradle setting.

    Thanks for your continuous support.
     
    lacost likes this.
  32. neowedge

    neowedge

    Joined:
    May 6, 2014
    Posts:
    9
    They answered today:

    The refund I am experiencing is ALWAYS just 5 minutes after the purchase. Is it possible that the plugin is sending a test refund order or something like this? (or maybe the new plugin is calling another Google API that works in that way in test mode?). Am I the only one that experiment this behaviour? Thanks!

    Maybe next week I could test the new version ;).
     
  33. kmdgames

    kmdgames

    Joined:
    Mar 22, 2019
    Posts:
    3
    Hi,
    After updating sdk to version 2019.18 ( Im using unity 2019.2.1), when I try to puchase something I get an error. ( I attached the logcat). I didnt change any code on my side everything is the same.

    Thanks.


    EDIT:

    I managed to debug it to the last point.
    In AddPayment method (UM_AndroidInAppClient.cs)
    skuDetails returns null.
    It throws error on "paramsBuilder.SetSkuDetails(skuDetails);"
    When I try to debug skudetails before that line
    Debug.Log("Sku Details ("+ productId +") : " + skuDetails.Description);
    It throws an error too.

    EDIT2:

    Works on editor.
     

    Attached Files:

    Last edited: Sep 26, 2019
  34. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    I am glad to hear that. So, in conclusion, you just made Force Resolve and that's it?
    Is there are any steps you have to go through to make plugin work with the proguard enabled?

    Thank you for sharing your experience, I think that will be very valuable for future users!
     
  35. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    @neowedge thanks for sharing.
    • As you can see the is not such refund reason listed as "invalid implementation".
    • There is no such thing as the test mode, it either works or not.
    • I wish I could provide more help on this matter but I am as frustrated by the issue as you are, and super curios if anybody else xeprincesing a similar issue.
     
  36. neowedge

    neowedge

    Joined:
    May 6, 2014
    Posts:
    9
    Sorry! I called test mode to test orders (orders made in the sandbox of Google Play). I supossed that if Google API changes, maybe it has different behaviour than previous one when you make a test order. Something like:

    Old Google Billing API -> When you do a test order, it is marked as "ok" in the console and show the price, but it's free
    New Google Billing API -> When yo do a test order, it is marked as "ok" first, then, 5 minutes later, servers check that it's a test order and it's refunded

    It's the only explain that I found. This week I'll continue resarching this and I'll make a real purchase in order to test if the real one is not refunded ;).
     
    lacost likes this.
  37. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Thank you for sharing your findings, interesting read,
     
  38. kmdgames

    kmdgames

    Joined:
    Mar 22, 2019
    Posts:
    3
    Hi,

    I had stucked somewhere related with inapps.
    We set a flag ( I set in playerprefs) when users made their purchases.

    But when they refund it how do we control?

    Do we have to set all the purchase flags to false then check them in the transectionObserver in every start and set flags to true if neccessarry?

    I mean if users purchase lets say "Remove Ads". We set PlayerPrefs.SetInt("IsNoAdsPurchased",1). Then users stop seing ads. But when users made a refund, how do we understand it and set "IsNoAdsPurchased" to 0 again.
     
    lacost likes this.
  39. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Well, that's a difficult topic, to be honest.
    There is no cross-platfrom API that will allow you to check if the product was purchased earlier.
    So yes, player prefs flag is your best bet.

    But then how do you cancel a purchase when it was refunded, right? Both iOS and Android provide a way of doing this, it just whose ways are so different that I can't make a unified API for this.

    Android.
    You can just query purchases anytime you want to validate the purchased products list:
    Code (CSharp):
    1. var result = m_BillingClient.QueryPurchases(AN_BillingClient.SkuType.inapp);
    2. if (result.BillingResult.IsSucceeded)
    3. {
    4.     foreach (var purchase in result.Purchases)
    5.     {
    6.         Debug.Log("User already purchased: " + purchase.Sku);
    7.     }
    8. }
    9. else
    10. {
    11.     Debug.LogError(result.BillingResult.Error.FullMessage);
    12. }
    iOS
    Get the app store receipt:
    https://unionassets.com/ios-native-pro/receipt-validation-630#validating-receipts-with-the-app-store

    Get purchases info using Apple server API (yes you would need own dedicated server fro this)
    https://forums.developer.apple.com/thread/46737
     
    kmdgames likes this.
  40. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
  41. Den_Shockapp

    Den_Shockapp

    Joined:
    Jun 18, 2018
    Posts:
    7
    Hello.

    What is happening now with the Google Play authorization? I've been using Ultimate Mobile for quite some time. But now I see that 90% of the users in the app get the error "unknown status code: 12501"

    I can't find a reason for that. Please explain.
     
  42. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
  43. Den_Shockapp

    Den_Shockapp

    Joined:
    Jun 18, 2018
    Posts:
    7
  44. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Where exactly do you get that "unknown status code" line? I guess this is a custom plugin log so I might not convert this error code to the readable error. But still, that's a valid error from the Google API.

    Can you reproduce an issue on your local device?
     
  45. cooloon

    cooloon

    Joined:
    Nov 25, 2014
    Posts:
    10
  46. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Hey @cooloon I will update Billing library to the latest version, no problem, as well as Android X lib
     
    cooloon and takano-mx like this.
  47. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    63
    @lacost Hello, I'm having a small issue, I'm setting the values in the Info.plist for eg. NSMicrophoneUsageDescription either in the Ultimate-> iOS Native settings, or directly in the iOS Native settings, but they get reset when doing a build to the default value and they also have the default value in the xcode project.
    Not all the values get reset, only NSCameraUsageDescription, NSPhotoLibraryUsageDescription and NSMicrophoneUsageDescription.
    Can this be because I'm not using these features?
     
  48. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    Hey @Grumpy-Dot I was actually able to set the description with no issues
    Unity-iPhone_xcodeproj.png

    I can debug in yout project if you'd like.
     
  49. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    63
    @lacost I've found the issue. In my project I'm not using the Camera, so the field CameraUsageDescriptionEnabled is false.
    In this case, it will reset the value of CameraUsageDescription to the default.
    I'm not entirely sure if the xcode needs this values if I'm not using the features, but I do not want to take any chances, so I will ignore the CameraUsageDescriptionEnabled flag when setting the description.
    Let me know when you think about this, and if you would like to update it.
     
  50. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,723
    @Grumpy-Dot Sorry, I am not sure I am following.
    1. you have CameraUsageDescription disable under the UI Kit settings right? And you still have CameraUsageDescription in your Xcode plist when compiled but with a default value?
    2. How is this connected with NSMicrophoneUsageDescription?

    Let's go this way, please share settings screenshot and then tell me:
    What do you expect to happen & What actually happened :)
     
    Last edited: Oct 11, 2019
unityunity