Search Unity

[Released] Android Native Pro

Discussion in 'Assets and Asset Store' started by lacost, Sep 5, 2018.

  1. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    The 2019.2.10 update

    Version Notes
    • Unity 2018.3 Native & Unity threads synchronization issue fixed.
    • Camera & Gallery example scene improved.
    • Leaderboard client code documentation updated
    • Settings window deprecation warning fix unity 2018.2.
    • Unity 2019 deprecations warnings fixed.
    • Test resources clean up.
     
  2. fraise25

    fraise25

    Joined:
    Jan 7, 2015
    Posts:
    6
    Android Native auto manifest not work.
    not added automatically
     
  3. Modernllama

    Modernllama

    Joined:
    Nov 30, 2012
    Posts:
    19
    Hi @lacost

    Seem to get an error with using the media picker for video and images.

    The log is below. Basically what seems odd is that the activity seems to launch successfully but nothing seems to render. If I then lock and unlock the device, I'm presented with a black screen.

    Any ideas?

    Code (CSharp):
    1. 01-30 16:03:18.454 17634-17695/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 52000 mC, weight[0] 1
    2. 01-30 16:03:18.454 17634-17695/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 54000 mC, weight[1] -1
    3. 01-30 16:03:19.143 28347-28364/? E/AndroidNative: Unity: Sent to Java -> AN_UnityBridge.RegisterMessageHandler
    4. 01-30 16:03:19.147 28347-28364/? E/AndroidNative: Handler registred
    5. 01-30 16:03:19.151 28347-28364/? E/AndroidNative: StrictMode set
    6.                                                  
    7.                                                  
    8.                                                   --------- beginning of system
    9. 01-30 16:03:19.168 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
    10. 01-30 16:03:19.168 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
    11. 01-30 16:03:19.172 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
    12. 01-30 16:03:19.172 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
    13. 01-30 16:03:19.177 28347-28364/? E/AndroidNative: Unity: Sent to Java -> AN_Gallery.PickImageFromGallery :: 512 | 295 | True
    14. 01-30 16:03:19.218 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
    15. 01-30 16:03:19.218 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
    16. 01-30 16:03:19.221 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
    17. 01-30 16:03:19.221 4752-4766/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
    18. 01-30 16:03:19.223 4752-5440/? I/ActivityManager: START u0 {cmp=com.virti.simulationappstaging/com.stansassets.core.utility.AN_ProxyActivity (has extras)} from uid 10366
    19. 01-30 16:03:19.225 688-688/? D/QCOM PowerHAL: LAUNCH HINT: ON
    20. 01-30 16:03:19.226 688-688/? D/QCOM PowerHAL: Activity launch hint handled
    21.                                              
    22.                                               [ 01-30 16:03:19.254 28347:28364 D/         ]
    23.                                               PlayerBase::stop() from IPlayer
    24. 01-30 16:03:19.254 28347-28364/? D/AudioTrack: stop() called with 330240 frames delivered
    25. 01-30 16:03:19.269 28347-28357/? I/ationappstagin: Background concurrent copying GC freed 16494(914KB) AllocSpace objects, 4(416KB) LOS objects, 51% free, 1456KB/2MB, paused 5.170ms total 20.925ms
    26. 01-30 16:03:19.275 28347-28347/? W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ec7a58d
    27. 01-30 16:03:19.286 28347-28347/? E/AndroidNative: AN_ProxyActivity onStart
    28. 01-30 16:03:19.288 28347-28347/? E/AndroidNative: chooserType: 295
    29. 01-30 16:03:19.307 28347-28347/? E/AndroidNative: Multiselect allowed!
    30. 01-30 16:03:19.339 28347-28444/? I/OpenGLRenderer: Initialized EGL, version 1.4
    31. 01-30 16:03:19.339 28347-28444/? D/OpenGLRenderer: Swap behavior 1
    32. 01-30 16:03:19.382 4752-4774/? I/ActivityManager: Displayed com.virti.simulationappstaging/com.stansassets.core.utility.AN_ProxyActivity: +109ms
    33. 01-30 16:03:19.405 688-688/? D/QCOM PowerHAL: LAUNCH HINT: OFF
    34. 01-30 16:03:19.415 28347-28364/? E/AndroidNative: Unity: [Async] Sent to Unity ->: {"m_media":[],"m_error":{"m_code":100,"m_message":"Error creating directory: /storage/emulated/0/bichooser"}}
    35. 01-30 16:03:19.419 17634-17700/? I/ThermalEngine: ACTION: CLUSTER - Setting CLUSTER[1] to 2150400
    36. 01-30 16:03:19.456 17634-17695/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 50000 mC, weight[0] 1
    37. 01-30 16:03:19.456 17634-17695/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 56000 mC, weight[1] -1
    38. 01-30 16:03:20.457 17634-17695/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 50000 mC, weight[0] 1
    39. 01-30 16:03:20.458 17634-17695/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 54000 mC, weight[1] -1
    40. 01-30 16:03:21.423 17634-17700/? I/ThermalEngine: ACTION: CLUSTER - Setting CLUSTER[1] to 2054400
    41. 01-30 16:03:21.460 17634-17695/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 49000 mC, weight[0] 1
    42. 01-30 16:03:21.460 17634-17695/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 53000 mC, weight[1] -1
    43. 01-30 16:03:21.769 689-851/? I/nanohub: osLog: [AR_CHRE] IDLE => ON
     
  4. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hello, The Android Native plugin will maintain manifest under the plugin local folder it will not touch or create Assets/Plugins/Android/AndroidManifest.
    The plugin manifest is located under
    Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Android/Core/an_library.bundle/AndroidManifest.xml


    If there are any particular issues you would like to report about manifest management, please let me know.


    @Modernllama Hey, I might know where it's coming from, looks like your app does not have permission to write/read. Can you please tell me what Unity version are you using?
     
  5. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    The 2019.3.11 update

    Version Notes
    • Editor UI Search bar added.
    • Simplified Permissions API fixes.
    • Permissions API does not require support v4 library anymore.
    • Sharing builder now will automatically request.WRITE_EXTERNAL_STORAGE permission if needed.
    • Android 7 and lower small notification icons usage documentation.
    • Activity callbacks fixed.
    • Local Notification will not be displayed now if an application is currently in the foreground.
     
  6. James-Jo

    James-Jo

    Joined:
    Feb 11, 2019
    Posts:
    9
    I've upgraded to ultimate-mobile-pro 2019.3.9 version and currently going through the process of updating my code.

    I was looking around in the documentation and couldn't find a direct reference to finding the Locale like the original UM_Location.Instance.GetLocale (UM_Location.OnLocaleLoaded).
    I need a country code for device.
    What would be the best way of finding the Locale of a iOS and Android device?
     
  7. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hey @unity_alNcql9p95GK5g looks like I missed that API. I do have it for iOS but not for Android and Ultimate. Thanks for the feature request I will add it ASAP.
     
  8. James-Jo

    James-Jo

    Joined:
    Feb 11, 2019
    Posts:
    9
    Thank you
    One more question.
    Older versions of banner ads
    UM_AdManager.CreateAdBanner (x, y, GADBannerSize.BANNER);
    I was able to set the location of the banner, but not found in new version.

    And

    Android, iOS Save or Load Game Data
    I've saved game data from Android and iOS snapshots as a string or byte, but now there new version load game is no string or byte data in the return value.



    - Old Version class GK_SavedGame

    public event Action<GK_SaveDataLoaded> ActionDataLoaded = delegate {};
    private string _Id;
    private string _Name;
    private string _DeviceName;
    private DateTime _ModificationDate;
    private byte[] _Data = null; ===> Not in the new version.
    private bool _IsDataLoaded = false;



    - Old Version class GP_Snapshot

    public GP_SnapshotMeta meta;
    public byte[] bytes; ===> Not in the new version.
    public string stringData; ===> Not in the new version.


    please check
     
    Last edited: Feb 12, 2019
  9. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hello,

    The main idea is to unify the API for different ad networks. So current API is a very simple and straight forward. Take a look:
    https://unionassets.com/ultimate-mobile-pro/banner-ads-780

    However, you can specify some additional settings per network, for example, this is settings you can use for AdMob.
    https://unionassets.com/ultimate-mobile-pro/google-admob-784

    So you still can choose a banner size and banner anchor. I pretty sure you don't really want to operate with X &Y position.


    Ability to get pure bytes from your save is the core feature, so it's available with all the platforms:


    Ultimate - Cross-platform (iOS, Android, Editor emulation):
    https://unionassets.com/ultimate-mobile-pro/saved-games-732#load-game-data
    iOS
    https://unionassets.com/ios-native-pro/saving-a-game-662#retrieving-a-saved-game
    Android
    https://unionassets.com/android-native-pro/saved-games-682#writing_saved_games
     
  10. James-Jo

    James-Jo

    Joined:
    Feb 11, 2019
    Posts:
    9
    android-native-pro
    ios-native-pro
    Anymore new version is not support Real-Time Multiplayer and Turn-Based Multiplayer in old versions?
     
  11. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Nope, there are several reasons for it:
    • Expensive to implement, expensive to maintain.
    • Only about 2% of users asking about that feature.
    • Unity already made own Multiplayer solution, pretty hard to compete with that :)
     
  12. pvalium

    pvalium

    Joined:
    Oct 1, 2016
    Posts:
    21
    Have you planned to introduce quest & events from google play games?
    I would like some firebase analytics examples in documentation too. ie: send event with key, subkey and label
     
  13. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Not really, seems nobody seems interested so far. + there is no cross-platform analog.

    I do have a cross - services analytics that lets you report your event to several analytics services, and also can automatically report analytics events if you are using the plugin. Take a look:
    https://unionassets.com/ultimate-mobile-pro/getting-started-807
     
  14. NGS99

    NGS99

    Joined:
    Jan 15, 2014
    Posts:
    10
    Lacost, sent PM for assistance.
     
  15. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    @NGS999 I just did.
     
  16. NGS99

    NGS99

    Joined:
    Jan 15, 2014
    Posts:
    10
    Thanks, sent another PM with another issue.
     
  17. Radik-Salakhov

    Radik-Salakhov

    Joined:
    Nov 16, 2014
    Posts:
    16
    Hello,

    I use "Android Native" plugin to implement In-App purchases in my game (which is now in closed Beta). It works great: actual prices are retrieved, I can make purchases, and purchases made on a particular device can be restored to this device.

    But there is one issue with restoring purchases made on other devices with same account (I am not sure if it is problem with plugin or with google play service).

    On "Device A" I purchased "Product 1".
    On "Device B" I purchased "Product 2".
    Both devices uses same account and "Google Play" on both devices shows in order history "Product 1" and "Product 2". I even can't buy "Product 1" on "Device B" and "Product 2" on "Device A". I get message "You already own this item".

    The problem is: My game on "Device A" doesn't show that it owns "Product 2" and my game on "Device B" doesn't show that it owns "Product 1". I tried to reinstall application, but the result is always the same.

    All my products are configured in editor. To obtain products I call first "AN_Billing.Connect". Then I check in callback "AN_Billing.Inventory.Products". To detect if product was bought I use method "AN_Billing.Inventory.IsProdcutPurchased".

    What do I do wrong?

    Thanks

    best regards,
    Radik
     
  18. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hello, @Radik-Salakhov

    A couple of notes.
    Android kindly fills inventory with already purchased products on another user device. However, it might need some time to cache. So it will be a good user experience if in case of getting "You already own this item" Error you can provide your user with the purchased content.

    Sounds like a perfectly valid flow.
    Can you please post a code here? If your code will not raise any flags for me I will investigate an issue more. Would appreciate the cooperation, since I just checked on my test application and inventory state was perfectly synced on both devices.
    Thanks.
     
  19. Radik-Salakhov

    Radik-Salakhov

    Joined:
    Nov 16, 2014
    Posts:
    16
    I made reset for my both devices and it works fine since.
    Thanks for such great plugins.
     
  20. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
  21. zoolax

    zoolax

    Joined:
    Apr 18, 2013
    Posts:
    19
    Hi, I am including native pro plug in unity 2018.3
    I have services on and I have Auto manifest management 1.jpg 2.jpg enabled as well.
    But nothing happens, my manifest in stansAssets/.../an_library.bundle dose not get updated as well as in the editor view. I just imported the asset, is there a start setup or initial step that I missed?
    I double check this on Unity 2017.4.13f in a clean project as well. same problem.
    It seems as when i turn on and off services no events go out, or I am missing something.
    I using the latest version of your plug in as well.

    and my number 2 problem is when I download google admob plugin which come along with auto resolver .
    After I auto resolve it . it relocate all the above and some others to the root android folder

    it shows different types of errors.
    Such as it can not merge the manifests it can not find certain values in res.
    or other errors such as:
    * What went wrong:
    Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForRelease'.
    > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: E:\UnityProj\Zoolax_2\ZN2_master_b1\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\0.jar, E:\UnityProj\Zoolax_2\ZN2_master_b1\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\1.jar, E:\UnityProj\Zoolax_2\ZN2_master_b1\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\2.jar, E:\UnityProj\Zoolax_2\ZN2_master_b1\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\3.jar, E:\UnityProj\Zoolax_2\ZN2_master_b1\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\4.jar, E:\UnityProj\Zoolax_2\ZN2_master_b1\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\5.jar, E:\UnityProj\Zoolax_2\ZN2_master_b1\Temp\gradleOut\build\intermediates\transforms\dexBuilder\rel

    I have already read you have addressed this in you documentation to some extent.
     

    Attached Files:

    • 3.jpg
      3.jpg
      File size:
      45.8 KB
      Views:
      303
    • 4.jpg
      4.jpg
      File size:
      47 KB
      Views:
      927
    • 5.jpg
      5.jpg
      File size:
      63 KB
      Views:
      987
  22. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hey @zoolax let's start from scratch here.

    You are trying to enable vending and local notification right?
    Why do you think the Manifest is not getting affected?

    It will only change installed libraries and add manifest requirements if something is missing(no need to laucnh an updater if there is nothing to updater) and it will do it during the build post process(some operation can take few sec or even 10-15 sec, I don't want you to go through it every time you switch something in UI).

    Long story short. the Plugin will apply necessary changes when you will build for the first time you changes something in settings.

    Now. According to your screenshots, you do not have Jar Resolver enabled, but you do have a lot of resolver libraries installed an I am assuming resolver is also in your project. 100% you will have a lot of DEX exceptions

    Firs. read about jar resolver here:
    https://unionassets.com/android-native-pro/unity-jar-resolver-669

    In order to fix a project, please follow 2 simple steps.
    1. Enable jar resolver as shown in a guide above.
    2. Start forces resolve as described here

    You should be good to go after that.
    Thx a lot for sharing your experience. I am going to start making some tutorial video and your post was very helpful. Since I understand that this is a most confusing topic and I want to be covered,
     
  23. SoftabilityStudio

    SoftabilityStudio

    Joined:
    May 24, 2017
    Posts:
    1
    Hi

    I have problem with Ultimate mobile pro camera.

    1.
    All Samsung phones I have tested gives landscape pictures when portrait pictures taken (example galaxy s7 edge). I seems that picture does not contain rotation settings in metadata. So now user must take one portrait picture, then I can detect that this phone has the problem and I can rotate pictures. But that is bad way to do it. So is there any way to detect that problem in professional way?

    2 SOLVED
    Other is that I have also WebRtc component in software and it works right. But if I put ultimate mobile pro in same project with that, camera does not work anymore.
     
    Last edited: Apr 29, 2019
  24. ArnoldRauers_Tinytouchtales

    ArnoldRauers_Tinytouchtales

    Joined:
    Jan 25, 2015
    Posts:
    21
    Last edited: Apr 27, 2019
  25. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    That's actually quite interesting. Can you specify what WebRtc component do you have, I would really like to test that behavior. Thanks.

    @H1RN sorry I wasn't able to replay faster on forum :)
     
  26. ArnoldRauers_Tinytouchtales

    ArnoldRauers_Tinytouchtales

    Joined:
    Jan 25, 2015
    Posts:
    21
    @lacost No problem.

    I have a new issue with the Saved Games implementation.
    I used to use Android Native and everything worked fine, now after switching to Native Pro i can't access the
    Snapshot.Data:

    My save data looks like this:

    Code (CSharp):
    1. {"date":"4/30/2019 4:19:05 PM","progress":17,"version":"1.1","totalWins":2,"tutorialDone":true,"highscoreNormalModeDataJSON":"{\"scores\":[{\"score\":113,\"potionScore\":21,\"combinedScore\":11321,\"potionName\":\"epic/empty/chromatic/rainbow\",\"playername\":\"\",\"potionIconData\":\"chromaticepic/blue0\"},{\"score\":111,\"potionScore\":18,\"combinedScore\":11118,\"potionName\":\"massive/bicolor/balanced/healing\",\"playername\":\"\",\"potionIconData\":\"greenmassiv/red4\"}]}","potionDataJSON":"{\"potions\":[{\"potionInfo\":{\"customerNeed\":\"circle\",\"customerLike\":\"square\",\"potionName\":\"epic/empty/chromatic/rainbow\",\"potionScore\":21,\"cardInfos\":[{\"cardType\":\"square\",\"cardLabelType\":\"any\",\"symbol0\":\"triangle\",\"symbol1\":\"empty\",\"value\":8},{\"cardType\":\"circle\",\"cardLabelType\":\"any\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":2},{\"cardType\":\"triangle\",\"cardLabelType\":\"left\",\"symbol0\":\"circle\",\"symbol1\":\"empty\",\"value\":3},{\"cardType\":\"x\",\"cardLabelType\":\"both\",\"symbol0\":\"triangle\",\"symbol1\":\"circle\",\"value\":2}]},\"recipeType\":\"mix\",\"potionType\":\"rainbow\",\"potionName\":\"epic/empty/chromatic/rainbow\",\"potionIcon\":\"chromaticepic/blue0\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"skull\",\"customerLike\":\"x\",\"potionName\":\"normal/crimson/doubled/potion\",\"potionScore\":8,\"cardInfos\":[{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-3},{\"cardType\":\"circle\",\"cardLabelType\":\"left\",\"symbol0\":\"circle\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"x\",\"cardLabelType\":\"non\",\"symbol0\":\"empty\",\"symbol1\":\"empty\",\"value\":2},{\"cardType\":\"x\",\"cardLabelType\":\"left\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":4}]},\"recipeType\":\"pair\",\"potionType\":\"redPair\",\"potionName\":\"normal/crimson/doubled/potion\",\"potionIcon\":\"rednormal/blue6\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"triangle\",\"customerLike\":\"square\",\"potionName\":\"minor/azure/doubled/potion\",\"potionScore\":4,\"cardInfos\":[{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-3},{\"cardType\":\"circle\",\"cardLabelType\":\"any\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"circle\",\"cardLabelType\":\"right\",\"symbol0\":\"square\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"triangle\",\"cardLabelType\":\"left\",\"symbol0\":\"circle\",\"symbol1\":\"empty\",\"value\":3}]},\"recipeType\":\"pair\",\"potionType\":\"bluePair\",\"potionName\":\"minor/azure/doubled/potion\",\"potionIcon\":\"blueminor/yellow1\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"triangle\",\"customerLike\":\"circle\",\"potionName\":\"major/dangerous/doubled/potion\",\"potionScore\":9,\"cardInfos\":[{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":1},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":1},{\"cardType\":\"circle\",\"cardLabelType\":\"both\",\"symbol0\":\"skull\",\"symbol1\":\"triangle\",\"value\":4},{\"cardType\":\"triangle\",\"cardLabelType\":\"right\",\"symbol0\":\"circle\",\"symbol1\":\"empty\",\"value\":1}]},\"recipeType\":\"pair\",\"potionType\":\"blackPair\",\"potionName\":\"major/dangerous/doubled/potion\",\"potionIcon\":\"blackmajor/blue6\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"triangle\",\"customerLike\":\"x\",\"potionName\":\"strong/mineralized/tripple/emerald\",\"potionScore\":11,\"cardInfos\":[{\"cardType\":\"triangle\",\"cardLabelType\":\"non\",\"symbol0\":\"empty\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"triangle\",\"cardLabelType\":\"right\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"triangle\",\"cardLabelType\":\"any\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"square\",\"cardLabelType\":\"both\",\"symbol0\":\"triangle\",\"symbol1\":\"square\",\"value\":4}]},\"recipeType\":\"tripple\",\"potionType\":\"emerald\",\"potionName\":\"strong/mineralized/tripple/emerald\",\"potionIcon\":\"yellowstrong/green2\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"square\",\"customerLike\":\"circle\",\"potionName\":\"weak/bicolor/balanced/rebirth\",\"potionScore\":3,\"cardInfos\":[{\"cardType\":\"square\",\"cardLabelType\":\"any\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"square\",\"cardLabelType\":\"right\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-1},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-2}]},\"recipeType\":\"double\",\"potionType\":\"rebirth\",\"potionName\":\"weak/bicolor/balanced/rebirth\",\"potionIcon\":\"greenweak/black4\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"circle\",\"customerLike\":\"skull\",\"potionName\":\"strong/amber/doubled/potion\",\"potionScore\":11,\"cardInfos\":[{\"cardType\":\"circle\",\"cardLabelType\":\"any\",\"symbol0\":\"triangle\",\"symbol1\":\"empty\",\"value\":7},{\"cardType\":\"triangle\",\"cardLabelType\":\"any\",\"symbol0\":\"triangle\",\"symbol1\":\"empty\",\"value\":3},{\"cardType\":\"triangle\",\"cardLabelType\":\"both\",\"symbol0\":\"triangle\",\"symbol1\":\"square\",\"value\":3},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-4}]},\"recipeType\":\"pair\",\"potionType\":\"yellowPair\",\"potionName\":\"strong/amber/doubled/potion\",\"potionIcon\":\"yellowstrong/blue1\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"square\",\"customerLike\":\"x\",\"potionName\":\"massive/bicolor/balanced/healing\",\"potionScore\":18,\"cardInfos\":[{\"cardType\":\"square\",\"cardLabelType\":\"non\",\"symbol0\":\"empty\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"square\",\"cardLabelType\":\"right\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"x\",\"cardLabelType\":\"left\",\"symbol0\":\"square\",\"symbol1\":\"empty\",\"value\":6},{\"cardType\":\"x\",\"cardLabelType\":\"right\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":2}]},\"recipeType\":\"double\",\"potionType\":\"healing\",\"potionName\":\"massive/bicolor/balanced/healing\",\"potionIcon\":\"greenmassiv/red4\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"x\",\"customerLike\":\"square\",\"potionName\":\"normal/defiled/empty/void\",\"potionScore\":8,\"cardInfos\":[{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-2},{\"cardType\":\"x\",\"cardLabelType\":\"any\",\"symbol0\":\"triangle\",\"symbol1\":\"empty\",\"value\":2},{\"cardType\":\"triangle\",\"cardLabelType\":\"left\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":2},{\"cardType\":\"square\",\"cardLabelType\":\"any\",\"symbol0\":\"triangle\",\"symbol1\":\"empty\",\"value\":6}]},\"recipeType\":\"empty\",\"potionType\":\"void\",\"potionName\":\"normal/defiled/empty/void\",\"potionIcon\":\"genericnormal/black0\",\"isNew\":true},{\"potionInfo\":{\"customerNeed\":\"x\",\"customerLike\":\"square\",\"potionName\":\"heavy/bloody/tripple/strength\",\"potionScore\":14,\"cardInfos\":[{\"cardType\":\"triangle\",\"cardLabelType\":\"any\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":4},{\"cardType\":\"x\",\"cardLabelType\":\"right\",\"symbol0\":\"square\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"x\",\"cardLabelType\":\"any\",\"symbol0\":\"x\",\"symbol1\":\"empty\",\"value\":4},{\"cardType\":\"x\",\"cardLabelType\":\"left\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1}]},\"recipeType\":\"tripple\",\"potionType\":\"strength\",\"potionName\":\"heavy/bloody/tripple/strength\",\"potionIcon\":\"redheavy/yellow6\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"triangle\",\"customerLike\":\"square\",\"potionName\":\"tiny/bicolor/balanced/avalanche\",\"potionScore\":1,\"cardInfos\":[{\"cardType\":\"triangle\",\"cardLabelType\":\"non\",\"symbol0\":\"empty\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"triangle\",\"cardLabelType\":\"left\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-3},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-2}]},\"recipeType\":\"double\",\"potionType\":\"avalanche\",\"potionName\":\"tiny/bicolor/balanced/avalanche\",\"potionIcon\":\"blacktiny/yellow2\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"circle\",\"customerLike\":\"x\",\"potionName\":\"normal/jade/doubled/potion\",\"potionScore\":7,\"cardInfos\":[{\"cardType\":\"circle\",\"cardLabelType\":\"right\",\"symbol0\":\"square\",\"symbol1\":\"empty\",\"value\":3},{\"cardType\":\"square\",\"cardLabelType\":\"right\",\"symbol0\":\"square\",\"symbol1\":\"empty\",\"value\":3},{\"cardType\":\"square\",\"cardLabelType\":\"left\",\"symbol0\":\"circle\",\"symbol1\":\"empty\",\"value\":2},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-3}]},\"recipeType\":\"pair\",\"potionType\":\"greenPair\",\"potionName\":\"normal/jade/doubled/potion\",\"potionIcon\":\"greennormal/blue2\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"skull\",\"customerLike\":\"x\",\"potionName\":\"major/bicolor/balanced/sickness\",\"potionScore\":9,\"cardInfos\":[{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-1},{\"cardType\":\"skull\",\"cardLabelType\":\"\",\"symbol0\":\"\",\"symbol1\":\"\",\"value\":-2},{\"cardType\":\"x\",\"cardLabelType\":\"non\",\"symbol0\":\"empty\",\"symbol1\":\"empty\",\"value\":2},{\"cardType\":\"x\",\"cardLabelType\":\"any\",\"symbol0\":\"triangle\",\"symbol1\":\"empty\",\"value\":2}]},\"recipeType\":\"double\",\"potionType\":\"sickness\",\"potionName\":\"major/bicolor/balanced/sickness\",\"potionIcon\":\"redmajor/black2\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"square\",\"customerLike\":\"circle\",\"potionName\":\"epic/liquid/tripple/survival\",\"potionScore\":21,\"cardInfos\":[{\"cardType\":\"square\",\"cardLabelType\":\"right\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"circle\",\"cardLabelType\":\"non\",\"symbol0\":\"empty\",\"symbol1\":\"empty\",\"value\":2},{\"cardType\":\"circle\",\"cardLabelType\":\"both\",\"symbol0\":\"circle\",\"symbol1\":\"triangle\",\"value\":4},{\"cardType\":\"circle\",\"cardLabelType\":\"left\",\"symbol0\":\"circle\",\"symbol1\":\"empty\",\"value\":6}]},\"recipeType\":\"tripple\",\"potionType\":\"survival\",\"potionName\":\"epic/liquid/tripple/survival\",\"potionIcon\":\"blueepic/green5\",\"isNew\":false},{\"potionInfo\":{\"customerNeed\":\"x\",\"customerLike\":\"triangle\",\"potionName\":\"normal/bicolor/balanced/wine\",\"potionScore\":8,\"cardInfos\":[{\"cardType\":\"circle\",\"cardLabelType\":\"left\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"circle\",\"cardLabelType\":\"right\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"x\",\"cardLabelType\":\"right\",\"symbol0\":\"skull\",\"symbol1\":\"empty\",\"value\":1},{\"cardType\":\"x\",\"cardLabelType\":\"right\",\"symbol0\":\"square\",\"symbol1\":\"empty\",\"value\":1}]},\"recipeType\":\"double\",\"potionType\":\"wine\",\"potionName\":\"normal/bicolor/balanced/wine\",\"potionIcon\":\"bluenormal/red5\",\"isNew\":false}]}","statisticsDataJSON":"{\"statisticGameModeData\":[{\"gameMode\":\"normal\",\"totalGames\":38,\"win\":2,\"loss\":36,\"totalScore\":224,\"totalAmountOfPotions\":53},{\"gameMode\":\"daily\",\"totalGames\":1,\"win\":0,\"loss\":1,\"totalScore\":0,\"totalAmountOfPotions\":1}]}"}
    And when i retrieve the Snapshot data with

    Code (CSharp):
    1. byte[] data = snapshot.ReadFully();
    2. string base64Text = System.Convert.ToBase64String(data);
    The base64Text is not returning properly, here's the logcat dump:

    https://pastebin.com/dNEHHK8k

    All i'm getting is a truncated broken version of my data. I tool the output and ran it through base64decode.org and i'm only getting this:

    Code (CSharp):
    1. {"�d�a�t�e�":"�0�2�/�2�7�/�2�0�1�9� �1�6�:�3�2�:�4�7�"�,�"�p�r�o�g�r�e�s�s�":26�,�"�v�e�r�s�i�o�n�":"�1�.�1�"�,�"�t�o�t�a�l�W�i�n�s�":7�,�"�t�u�t�o�r�i�a�l�D�o�n�e�":�t�r�u�e�,�"�h�i�g�h�s�c�o�r�e�N�o�r�m�a�l�M�o�d�e�D�a�t�a�J�S�O�N�":"�{�\�"�s�c�o�r�e�s�\�"�:�[�{�\�"�s�c�o�r�e�\�"�:�1�3�7�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�3�5�,�\�"�c�o�m�b�i�n�e�d�S�c�o�r�e�\�"�:�1�3�7�3�5�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�l�e�g�e�n�d�a�r�y�/�b�i�c�o�l�o�r�/�b�a�l�a�n�c�e�d�/�h�e�a�l�i�n�g�\�"�,�\�"�p�l�a�y�e�r�n�a�m�e�\�"�:�\�"�\�"�,�\�"�p�o�t�i�o�n�I�c�o�n�D�a�t�a�\�"�:�\�"�r�e�d�l�e�g�e�n�d�a�r�y�/�g�r�e�e�n�0�\�"�}�,�{�\�"�s�c�o�r�e�\�"�:�1�3�0�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�2�4�,�\�"�c�o�m�b�i�n�e�d�S�c�o�r�e�\�"�:�1�3�0�2�4�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�e�p�i�c�/�j�a�d�e�/�d�o�u�b�l�e�d�/�p�o�t�i�o�n�\�"�,�\�"�p�l�a�y�e�r�n�a�m�e�\�"�:�\�"�\�"�,�\�"�p�o�t�i�o�n�I�c�o�n�D�a�t�a�\�"�:�\�"�g�r�e�e�n�e�p�i�c�/�r�e�d�7�\�"�}�,�{�\�"�s�c�o�r�e�\�"�:�1�2�3�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�2�3�,�\�"�c�o�m�b�i�n�e�d�S�c�o�r�e�\�"�:�1�2�3�2�3�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�e�p�i�c�/�j�a�d�e�/�d�o�u�b�l�e�d�/�p�o�t�i�o�n�\�"�,�\�"�p�l�a�y�e�r�n�a�m�e�\�"�:�\�"�\�"�,�\�"�p�o�t�i�o�n�I�c�o�n�D�a�t�a�\�"�:�\�"�g�r�e�e�n�e�p�i�c�/�b�l�u�e�2�\�"�}�,�{�\�"�s�c�o�r�e�\�"�:�1�1�7�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�1�9�,�\�"�c�o�m�b�i�n�e�d�S�c�o�r�e�\�"�:�1�1�7�1�9�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�e�x�h�a�l�t�e�d�/�b�i�c�o�l�o�r�/�b�a�l�a�n�c�e�d�/�w�i�n�e�\�"�,�\�"�p�l�a�y�e�r�n�a�m�e�\�"�:�\�"�\�"�,�\�"�p�o�t�i�o�n�I�c�o�n�D�a�t�a�\�"�:�\�"�b�l�u�e�e�x�h�a�l�t�e�d�/�r�e�d�3�\�"�}�,�{�\�"�s�c�o�r�e�\�"�:�1�1�6�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�2�0�,�\�"�c�o�m�b�i�n�e�d�S�c�o�r�e�\�"�:�1�1�6�2�0�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�e�x�h�a�l�t�e�d�/�e�m�p�t�y�/�c�h�r�o�m�a�t�i�c�/�r�a�i�n�b�o�w�\�"�,�\�"�p�l�a�y�e�r�n�a�m�e�\�"�:�\�"�\�"�,�\�"�p�o�t�i�o�n�I�c�o�n�D�a�t�a�\�"�:�\�"�c�h�r�o�m�a�t�i�c�e�x�h�a�l�t�e�d�/�y�e�l�l�o�w�6�\�"�}�,�{�\�"�s�c�o�r�e�\�"�:�9�9�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�1�9�,�\�"�c�o�m�b�i�n�e�d�S�c�o�r�e�\�"�:�9�9�1�9�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�e�x�h�a�l�t�e�d�/�b�i�c�o�l�o�r�/�b�a�l�a�n�c�e�d�/�n�u�t�u�r�e�\�"�,�\�"�p�l�a�y�e�r�n�a�m�e�\�"�:�\�"�\�"�,�\�"�p�o�t�i�o�n�I�c�o�n�D�a�t�a�\�"�:�\�"�b�l�u�e�e�x�h�a�l�t�e�d�/�g�r�e�e�n�0�\�"�}�,�{�\�"�s�c�o�r�e�\�"�:�9�9�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�1�7�,�\�"�c�o�m�b�i�n�e�d�S�c�o�r�e�\�"�:�9�9�1�7�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�m�a�s�s�i�v�e�/�a�z�u�r�e�/�d�o�u�b�l�e�d�/�p�o�t�i�o�n�\�"�,�\�"�p�l�a�y�e�r�n�a�m�e�\�"�:�\�"�\�"�,�\�"�p�o�t�i�o�n�I�c�o�n�D�a�t�a�\�"�:�\�"�b�l�u�e�m�a�s�s�i�v�/�r�e�d�8�\�"�}�]�}�"�,�"�p�o�t�i�o�n�D�a�t�a�J�S�O�N�":"�{�\�"�p�o�t�i�o�n�s�\�"�:�[�{�\�"�p�o�t�i�o�n�I�n�f�o�\�"�:�{�\�"�c�u�s�t�o�m�e�r�N�e�e�d�\�"�:�\�"�s�k�u�l�l�\�"�,�\�"�c�u�s�t�o�m�e�r�L�i�k�e�\�"�:�\�"�c�i�r�c�l�e�\�"�,�\�"�p�o�t�i�o�n�N�a�m�e�\�"�:�\�"�h�e�a�v�y�/�a�z�u�r�e�/�d�o�u�b�l�e�d�/�p�o�t�i�o�n�\�"�,�\�"�p�o�t�i�o�n�S�c�o�r�e�\�"�:�1�4�,�\�"�c�a�r�d�I�n�f�o�s�\�"�:�[�{
     
    Last edited: Apr 30, 2019
  27. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hey, @H1RN I see the way you read the data, can you also show how do you write the data?
    Also if you can make a sample project for me I will gladly test it,
     
  28. ArnoldRauers_Tinytouchtales

    ArnoldRauers_Tinytouchtales

    Joined:
    Jan 25, 2015
    Posts:
    21
    @lacost Well i did not write data yet, because i need to retrieve the data first to check if i can save a more advanced state.

    I used the latest Android Native 9.10/24 to write the data. With this function

    Code (CSharp):
    1. GooglePlaySavedGamesManager.Instance.CreateNewSnapshot(CloudSave, currentSaveState.version, Screenshot, JsonConvert.SerializeObject(currentSaveState), (long)currentSaveState.progress);
    Like posted above the data is a JSON that i De/Serialize from my SaveState data class.

    The crucial use case for me is that people who saved data with the old version of Android Native need to be able to retrieve this data with Android Native Pro as well.

    For the test project: sure i can give you a test project, but do you need any google play account sensitive data to test the saved games feature?
     
    Last edited: May 5, 2019
  29. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Okay, I am getting what are you struggling with. I think if you will modify your code to look like this, you'll be able to read string saved by an old plugin.


    Code (CSharp):
    1.  
    2. byte[] data = snapshot.ReadFully();
    3. string base64Text = GetString(data);
    4.  
    5. private static string GetString(byte[] bytes) {
    6.         char[] chars;
    7.         if (bytes.Length % 2 != 0) {
    8.             chars = new char[(bytes.Length / sizeof(char)) + 1];
    9.         }
    10.         else {
    11.             chars = new char[bytes.Length / sizeof(char)];
    12.         }
    13.  
    14.         System.Buffer.BlockCopy(bytes, 0, chars, 0, bytes.Length);
    15.         return new string(chars);
    16.     }
     
  30. ArnoldRauers_Tinytouchtales

    ArnoldRauers_Tinytouchtales

    Joined:
    Jan 25, 2015
    Posts:
    21
    @lacost

    Thanks for the code. I tried it and it's still the same issue. The weird � chars are gone, but my json data is still truncated to maybe 1/3 of the full json. It seems that somehow the new plugin does not access the full data that is saved in the cloud? Here's the log from adb:

    https://pastebin.com/RcdEvskL

    You can see that the json just stops at some point.

    Also your plugins says:

    05-07 09:00:20.525 5513 5525 D AndroidNative: Communication log to big to print it, we need to do something about it

    Maybe it can't read the full data?

    Thanks!
     
  31. ingman-interactive

    ingman-interactive

    Joined:
    Dec 2, 2016
    Posts:
    2
    Hello,

    we recently upgraded Android Native pro in our game from 2018.8.7 to 2019.5.14
    and are now seeing a lot of ANR problems in the Google Play console regarding local
    notifications.

    The error message shown is:

    Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{f97a080 u0 rocks.wildriver.xxx/com.stansassets.android.app.notifications.AN_AlarmNotificationService}
    "main" prio=5 tid=1 Native
    | group="main" sCount=1 dsCount=0 flags=1 obj=0x75e714b8 self=0x7dc8214c00
    | sysTid=26489 nice=0 cgrp=default sched=0/0 handle=0x7e4ecdd560
    | state=S schedstat=( 63405957 16068158 96 ) utm=0 stm=5 core=0 HZ=100
    | stack=0x7fd4446000-0x7fd4448000 stackSize=8MB
    | held mutexes=
    #00 pc 00000000000712a8 /system/lib64/libc.so (__epoll_pwait+8)
    #01 pc 00000000000141c0 /system/lib64/libutils.so (android::Looper::pollInner(int)+144)
    #02 pc 000000000001408c /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+60)
    #03 pc 000000000012bf84 /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
    at android.os.MessageQueue.nativePollOnce (Native method)
    at android.os.MessageQueue.next (MessageQueue.java:326)
    at android.os.Looper.loop (Looper.java:181)
    at android.app.ActivityThread.main (ActivityThread.java:7045)
    at java.lang.reflect.Method.invoke (Native method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)


    Just for info: We upgraded following the instructions at https://unionassets.com/ultimate-mobile-pro/introduction-725#plugin-update

    Has there anything else been changed regarding local notifications or do you maybe have an idea why these problems occur now?

    Edit (17.05): Just for info: We rolled back to 2018.8.7 now and ANRs are gone.
     
    Last edited: May 17, 2019
  32. ArnoldRauers_Tinytouchtales

    ArnoldRauers_Tinytouchtales

    Joined:
    Jan 25, 2015
    Posts:
    21
    Update: The code posted above actually does work. I was my fault because i thought my json was truncated because the log only showed parts of it. But indeed the full data could be read.

    One note: It seems that once you've save with the new system the cloud save is not readable anymore by the old plugin which make sense. So i would advice to either generate a new save file or mark the meta data of the snapshot. I did it with the description tag of the meta data. I check if the description of the snapshot belongs to an old or new save file.

    Thanks to @lacost for the quick help!
     
  33. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    @H1RN I am truly glad it solved!
    @ingman-interactive my bad. I'll upload a fix on a next week, in a meantime I will PM you the hotfix.
     
  34. ingman-interactive

    ingman-interactive

    Joined:
    Dec 2, 2016
    Posts:
    2
    @lacost: thank you for the quick response and fix :)
     
  35. ArnoldRauers_Tinytouchtales

    ArnoldRauers_Tinytouchtales

    Joined:
    Jan 25, 2015
    Posts:
    21
    I’ve run into another Android Native Pro Saved Games issue,
    this time with my other game Card Crawl.

    I’m getting a SNAPSHOT_NOT_FOUND error like seen here:

    Code (CSharp):
    1. 05-29 11:40:02.441 12448 12478 D AndroidNative: Unity: [Async] Sent to Unity ->: {"m_metadataList":[{"m_coverImageUri":"content://com.google.android.gms.games.background/images/d12972f1/8","m_description":"40,1,1,2381","m_hashCode":-160631915,"m_playedTime":0,"m_progressValue":-1,"m_title":"CardCrawlSaveGame"}]}
    2. 05-29 11:40:02.451 12448 12478 I Unity   : Load Snapshots Succeeded, count: 1
    3. 05-29 11:40:02.451 12448 12478 I Unity   : UnityEngine.Logger:Log(LogType, Object)
    4. 05-29 11:40:02.451 12448 12478 I Unity   : <>c__DisplayClass16_0:<OnPlayerConnected>b__0(AN_SnapshotsMetadataResult)
    5. 05-29 11:40:02.451 12448 12478 I Unity   : System.Action`1:Invoke(T)
    6. 05-29 11:40:02.451 12448 12478 I Unity   : System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    7. 05-29 11:40:02.451 12448 12478 I Unity   : System.Reflection.MethodBase:Invoke(Object, Object[])
    8. 05-29 11:40:02.451 12448 12478 I Unity   : UnityEngine.AndroidJavaProxy:Invoke(String, Object[])
    9. 05-29 11:40:02.451 12448 12478 I Unity   : UnityEngine._AndroidJNIHelper:InvokeJavaProxyMethod(AndroidJavaProxy, IntPtr, IntPtr)
    10. 05-29 11:40:02.451 12448 12478 I Unity   :
    11. 05-29 11:40:02.451 12448 12478 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
    12. 05-29 11:40:02.451 12448 12478 I Unity   :
    13. 05-29 11:40:02.451 12448 12478 D AndroidNative: Unity: Sent to Java -> AN_SnapshotsClient.Open :: 140343830 | CardCrawlGameSave | False | 2
    14. 05-29 11:40:04.311 12448 12478 D AndroidNative: Unity: [Async] Sent to Unity ->: {"m_error":{"m_code":2,"m_message":"com.google.android.gms.common.api.ApiException: 26570: SNAPSHOT_NOT_FOUND"}}
    15. 05-29 11:40:04.321 12448 12478 E Unity   : NullReferenceException: Object reference not set to an instance of an object.
    16. 05-29 11:40:04.321 12448 12478 E Unity   :   at SA.Foundation.Templates.SA_Error.get_FullMessage () [0x00000] in <00000000000000000000000000000000>:0
    17. 05-29 11:40:04.321 12448 12478 E Unity   :   at CloudSaveManager+<>c__DisplayClass16_1.<OnPlayerConnected>b__1 (SA.Android.GMS.Common.AN_LinkedObjectResult`1[T] resultSnapshot) [0x00000] in <00000000000000000000000000000000>:0
    18. 05-29 11:40:04.321 12448 12478 E Unity   :   at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0
    19. 05-29 11:40:04.321 12448 12478 E Unity   :   at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0
    20. 05-29 11:40:04.321 12448 12478 E Unity   :   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0
    21. 05-29 11:40:04.321 12448 12478 E Unity   :   at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0
    22. 05-29 11:40:04.321 12448 12478 E Unity   :   at UnityEngine._Andro
    But as with my other games i’m able to load the snapshot just fine in my old Android Native version.
    Only after switching to Native Pro i’m getting this error. This also seems to be another issue
    not related to my last one where the Byte Data could not be read.
    Here’s the Adb log of my Android Native version where everything works fine.

    Code (CSharp):
    1. SavedGamesManager: OnLoadSnapshotsResult
    2. 05-29 11:02:14.445 19552 19575 I Unity   :
    3. 05-29 11:02:14.445 19552 19575 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    4. 05-29 11:02:14.445 19552 19575 I Unity   :
    5. 05-29 11:02:14.447 19552 19575 I Unity   : Loaded: 1 Snapshots
    6. 05-29 11:02:14.447 19552 19575 I Unity   :
    7. 05-29 11:02:14.447 19552 19575 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    8. 05-29 11:02:14.447 19552 19575 I Unity   :
    9. 05-29 11:02:14.449 19552 19575 I Unity   : Meta.Title: CardCrawlSaveGame
    10. 05-29 11:02:14.449 19552 19575 I Unity   :
    11. 05-29 11:02:14.449 19552 19575 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    12. 05-29 11:02:14.449 19552 19575 I Unity   :
    13. 05-29 11:02:14.450 19552 19575 I Unity   : Meta.Description: 40,1,1,2381
    14. 05-29 11:02:14.450 19552 19575 I Unity   :
    15. 05-29 11:02:14.450 19552 19575 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    16. 05-29 11:02:14.450 19552 19575 I Unity   :
    17. 05-29 11:02:14.451 19552 19575 I Unity   : AN: Using proxy for class: com.androidnative.gms.core.GameClientBridge method:OpenSpanshotByName_Bridge
    18. 05-29 11:02:14.451 19552 19575 I Unity   :
    19. 05-29 11:02:14.451 19552 19575 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    20. 05-29 11:02:14.451 19552 19575 I Unity   :
    21. 05-29 11:02:16.831 19552 19575 I Unity   : SavedGamesManager: OnSavedGamePicked
    22. 05-29 11:02:16.831 19552 19575 I Unity   :
    23. 05-29 11:02:16.831 19552 19575 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    24. 05-29 11:02:16.831 19552 19575 I Unity   :
    25. 05-29 11:02:16.843 19552 19575 I Unity   : ActionGameSaveLoaded: STATUS_OK
    26. 05-29 11:02:16.843 19552 19575 I Unity   :
    27. 05-29 11:02:16.843 19552 19575 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    28. 05-29 11:02:16.843 19552 19575 I Unity   :
    29. 05-29 11:02:16.844 19552 19575 I Unity   : Save data loaded: {"saveGame": [{"specialCardUnlocked":"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1","unlockedDealers":"1,0,0","unlockedAvatars":"1,0,0,0","totalGold":"2381","totalWins":"100","highscorenormal":"2089000002010025034,2082015021022029033,2080000002004005008,2078000001003004005,2065000001002003004,1019000010016032033,1009012018024026034","highscoreconstructed":"empty","streakScore":"0","streak":"0","longestStreak":"2","dealerQuestTopDone1":"False","dealerQuestTopDone2":"False","dealerQuestBottomDone1":"False","dealerQuestBottomDone2":"False","avatarQuestTopDone1":"False","avatarQuestTopDone2":"False","avatarQuestTopDone3":"False","avatarQuestBottomDone1":"False","avatarQuestBottomDone2":"False","avatarQuestBottomDone3":"False","gamesWonOver100":"1","gamesWonOver120":"0","gamesWonWithoutAbility":"0","gamesWonWithMoreThan20Life":"0"}]}
     
  36. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hey, @H1RN thx a lot for the report. I can't say right now what the exact issue is. I hope you can help me to debug it. I just send you an updated library with more looks. Looking forward to hear from you.
    Cheers!
     
  37. ChristianDeramo

    ChristianDeramo

    Joined:
    Jun 10, 2019
    Posts:
    1
    Hello,
    I have imported the whole plugin, but I can't find SA.Android.Supportv4. How can I resolve this?
     
    Last edited: Jun 11, 2019
  38. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Can you please explain what so you mean? Just tell me, what are you trying to do?
     
  39. unity_CM5LIE6yvxd4fQ

    unity_CM5LIE6yvxd4fQ

    Joined:
    Apr 20, 2019
    Posts:
    5
    how do i restore in-app purchase?
     
  40. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
  41. milox777

    milox777

    Joined:
    Sep 23, 2012
    Posts:
    106
    In the previous version I could get the Google Game Services Auth token for Playfab Login with Google Play Game Services option, how do I get it now?
     
  42. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    151
    Hi there. I'm currently using Android Native Pro v 2018.7.6, previously had been using Android Native.
    My app has a feature to save out a transparent PNG to the user's gallery, but I just now noticed that this functionality no longer works in Android Native Pro- saving a PNG to the users gallery no longer saves with the transparency.
    Do you know if this broken functionality was observed and fixed in any versions after 2018.7.6?

    EDIT: I updated to 2019.5.14 and it appears to have been fixed, for anyone else that stumbles upon this bug in earlier versions.
     
    Last edited: Jun 23, 2019
    lacost likes this.
  43. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    Hmm... I might forget to add it, can you please point me to the Google API you missing? So I will make sure I will add the exact feature you need.
     
  44. ArnoldRauers_Tinytouchtales

    ArnoldRauers_Tinytouchtales

    Joined:
    Jan 25, 2015
    Posts:
    21
    Short Update: My issue in the end was a mistake on my side and had nothing todo with the plugin code. I mistakenly use a wrong Snapshot Title string and that's why the Snapshot could not be opened. Weeks wasted, but oh well. Thanks again to @lacost for the amazing support!
     
    lacost likes this.
  45. tesan

    tesan

    Joined:
    Oct 1, 2014
    Posts:
    7
    Hello,
    I've some issue when I try to build a 64bit version, is your plugin compatible with 64bits (if yes, from which version?)
    Thank you.
     
  46. NickNack84

    NickNack84

    Joined:
    Dec 5, 2013
    Posts:
    3
    Hi, I tried the example "Rate us Dialog" with this code:
    Code (CSharp):
    1. Uri uri = new Uri("market://details?id=" + Application.identifier);
    2. AN_Intent viewIntent = new AN_Intent(AN_Intent.ACTION_VIEW, uri);
    3. AN_MainActivity.Instance.StartActivity(viewIntent);
    The activity opens successfully but when I touch the device back button, I get redirected to my app but to a completely black view. I need to touch the back button again to remove that black view / layer.

    UM Plugin Version is the latest available.
    Android Version is 8.1.0 - Any ideas? :)
     
  47. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    69
    I'm running into an issue with SaveImageToGallery(). I'm calling this:

    Code (CSharp):
    1. AN_Gallery.SaveImageToGallery(screenshot, "some_filename", "AppFolder", AN_GalleryFormat.PNG, (result) => {
    2.             this.OnGalleryImageSaved(result);
    3.         });
    But the screenshot just gets saved to the Pictures album instead of AppFolder. As far as I'm aware, the old Android Native allowed this, but I'm not sure what I'm doing wrong.
     
  48. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    There should not be any issues when building for 64bit version. If you have any specific version, please share.

    Thanks for the report @NickNack84 I'll give that a try and will get back to you.
     
  49. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,632
    @greay That should actually work. I will give that a try and let you know if there is any issue.
     
  50. knuppel

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    90
    Hello,
    is there a documentation on how to install google play services and developer console?
     
unityunity