Search Unity

[Released] Ultimate Mobile Pro

Discussion in 'Assets and Asset Store' started by stanislav-osipov, Oct 19, 2018.

  1. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @numabus My bad, current released version will not emulate popups in the editor, will only work on rela devices.
    Sorry it's been almoust a month since last release, and huge amount of feature is added, so doc's may contain some feature that not yer avalible.

    The release is shcguled to this weekends, or just PM me and I will send you the version that deos emulate popups inside Unity editor as well.
     
  2. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Plugin does not add and not required phone-usage permissions. You can check the plugin manifest your self, please check what kind of AndroidManifest.xml files you have in your project.

    I also do not see any buttons in the settings ui - What buttons are you talking about?
    I also do not see the summary tab. - As I sad before this feature is coming with the update. Update is planned on this weeknd.
     
  3. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @The_Arrival very nice quiastion. The another push for me to finaly start making videos with a lot of exmplanations :) Since this is something I already talkd to few poeple about.

    So you mean someboay purahsed non-cons item (let's say new track) then requiested a refund, and you want that item to be locked for customer again?

    So there is no way silently get current customer non-cons purchases satate. No way to do this fot iOS. On Android if you wish you can run RestorePurschases method every time user loging in. This will do wxactly what you want. but on iOS RestorePurschases will ask user to provide login & pass, and you do not want that every time user launches your app.
    Yea, old version was using PP and it wasn't good desigion at all, since it was even more confusing.
    Long story short I don't know how to track silently refund on iOS. I don't thinks it's possible at all. But I will researtch more. If you will find any iOS API that will able to do it, I will gladly implenent it.

    The Permissoon:
    If I will enable every single feature provided by Android Native part of Ultimate Mobile this is the permissions requirement's I am going to get (summary tab will be avaliable with the next update =) ):

    Screenshot_112918_032527_PM.jpg

    So there is no CALL_PHONE, ect. If your app does ask this, let's meet and analyze your project. But I can say 100% this is not due to my plgin. But would like to meet to make sure I am not mistaking :)

    Not relay. The iOS part of Camera & Gallery are enabled since the UIKit is enabled. There is not way to disable UIKit, and nbo point of disabling it eather.
    What is disabled inside the UIKit setting is the Plist keys. But not the API it'self.
     
  4. The_Arrival

    The_Arrival

    Joined:
    Dec 3, 2014
    Posts:
    82
    Hello lacost,

    thanks for your answer. First of all i found a solution to the permission issue!
    this thread covers most likely the reason for those additional permissions: https://forum.unity.com/threads/unity-2017-read_phone_state-permission-cant-remove.486732/

    In summary:
    1. IF Android API level is less than 4* then this permission is added.
    2. Our Unity projects will often have more than one Android Manifest. If one of them does not specify the minimum target, it will assume API 1 which is less than 4. If it thinks you are using something less than 4, this permission is added.
    3. To "fix" the permission prompt you can add 2 lines to your manifest as described here:
    (namespace for tools and a remove line for the phone).
    <uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" /
    4. If however, you are trying to put this on Google Play, and you don't have privacy statement (and don't want one), then the solution above is not for you. what you need to do, is to search for Android Manifest in your project and make sure that every one has a minimum API greater than 4. For example,
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26" />

    So i guess you guys did your homework already and added those lines to you manifest(s), BUT if you set your BuildSystem to "internal" those seems to get ignored and those permissions make their way back to the final manifest in the staging area

    In general it might be cleaner to double-check and make sure all additional manifests specify the API level, so an override/removal is not necessary in the first place

    If you did all of this i´d be interested to work out this issue together with you. If you like, pm me and we can share contacts (discord, slack) and set something up. Thanks in advance

    One question you forgot to answer is the ETA for the Amazon IAPs in the Android Plugin and UM-API. Since we cover amazon with our app, i´m forced to implement amazon as well, before i can ship any update
     
  5. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    ok i think i understand. So the SubmitScore function auto detects platform as well?
     
  6. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @The_Arrival thx for your finding regarding the android phone state permission API. I will make an additional article about that. I will also contact you directly to talk more about it.
     
  7. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Yep, all the UM feature are detecting the platform automatically.
    And one of the best features if you use it with Unity Editor it will emulate the real API, so you can test your implementation before build on a real device.
     
  8. ahching

    ahching

    Joined:
    Nov 11, 2016
    Posts:
    4
    Hi Lacost,

    Delete the plugin folder, update the UMP to 2018.8.4, import again, it is OK now. Thanks!
     
  9. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Yea, that looked like an update issue. Keep me posted in case anything else happen :)
     
  10. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    The 2018.8.5 update is ready!
    600-landscape.png
    Version Notes:

    CROSS-PLATFORM
    - Advertisement service added.
    - Advertisement: Unity Ads support added.
    - Advertisement: Google Admob added.
    - Firebase service added
    - Firebase: Now also supported on iOS platfrom
    - Native UI: DatePicker added
    - Native UI: Editor popups emulation added
    - Native UI: Native Preloader API added
    - Camera API: Capture Video added
    - Gallery API: Pick Video added
    - Game Services: Editor emulation improvments (sing in, achiemvents, leaderboards)
    - Game Services: Leaderboards API added ability to load leaderboards meta and currnet player score
    - Editor UI: Summary Tab Added
    - Local Notifications: OnNotificationReceived event added
    - 2018.3 Compatbility fixes

    ANDROID:
    - App DatePicker added
    - App. ability to play a video by URL using MediaPlayer
    - Google Play. AN_SnapshotMetadataChange now give a warning when playedTimeMillis or progressValue are set to zero
    - Editor UI. Requirements are now selectable labels.
    - Editor UI.wtf log setting added
    - gson lib moved to maven dependency
    - AN_Logger initialization on Awake fixed
    - AN_Image now resuing URI to prevent multiple images created for the same texture on a device
    - Alarm notification service is now launched in separate thread to prevent ANR on some devices.
    - Fxied duplicated billing events on failed purchase
    - Billing already owned even auto resolution implemented
    - Fixed issue when native preloader is blocking Unity(main) thread

    IOS:
    - Editor UI. Requirements are now selectable labels.
    - User Notifications: ISN_UNActionIdentifier added
    - User Notifications: OnNotificationClick fixed
    - XCode: Shell scripts phase fixed for 2018.3
    - GetLastOpenNotification Idle Handler exception fixed
     
  11. Pascal-

    Pascal-

    Joined:
    Mar 23, 2013
    Posts:
    32
    Hello,

    I'd like to open files like pdf from the streaming asset folder on third IOS application for pdf.
    Could you please give me some advice how to do so using ultimate mobile if it's possible?
    I'm using Unity 2018.2.13

    Thanks a lot,
    Pascal
     
  12. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey, well that is a very specific and not really a game oriented request.
    That's why I do not really have this feature out of the box inside the asset.
     
  13. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    The beta version with the Playmaker support will be ready this next week. If there is anybody who wants to test an early beta, please PM me.
    Thanks.
     
  14. AdrianForest

    AdrianForest

    Joined:
    Jul 11, 2018
    Posts:
    1
    I've imported this package into a project that already uses Firebase, and I suspect there's a conflict happening there. When I try to build, I get the following error log:

    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. C:/Program Files/Java/jdk1.8.0_144\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2018.2.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
    3.  
    4. stderr[
    5.  
    6. FAILURE: Build failed with an exception.
    7.  
    8. * What went wrong:
    9. A problem occurred configuring project ':Firebase'.
    10. > Could not resolve all files for configuration ':Firebase:classpath'.
    11.    > Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
    12.      Searched in the following locations:
    13.          https://jcenter.bintray.com/com/android/tools/build/manifest-merger/26.0.1/manifest-merger-26.0.1.jar
    14.    > Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.0.1).
    15.      Searched in the following locations:
    16.          https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/26.0.1/ddmlib-26.0.1.jar
    17.    > Could not find dvlib.jar (com.android.tools:dvlib:26.0.1).
    18.      Searched in the following locations:
    19.          https://jcenter.bintray.com/com/android/tools/dvlib/26.0.1/dvlib-26.0.1.jar
    20.    > Could not find common.jar (com.android.tools:common:26.0.1).
    21.      Searched in the following locations:
    22.          https://jcenter.bintray.com/com/android/tools/common/26.0.1/common-26.0.1.jar
    23.  
    24. * Try:
    25. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    26.  
    27. * Get more help at https://help.gradle.org
    28.  
    29. BUILD FAILED in 1s
    30. ]
    31. stdout[
    32.  
    33. ]
    34. exit code: 1
    35. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <5c71878999f0497585d65b3e22368ad9>:0)
    36. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <5c71878999f0497585d65b3e22368ad9>:0)
    37. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <5c71878999f0497585d65b3e22368ad9>:0)
    38. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <5c71878999f0497585d65b3e22368ad9>:0)
    39. Rethrow as GradleInvokationException: Gradle build failed
    40. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <5c71878999f0497585d65b3e22368ad9>:0)
    41. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5c71878999f0497585d65b3e22368ad9>:0)
    42. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5c71878999f0497585d65b3e22368ad9>:0)
    43. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    44.  
    Any idea what's causing this? I can't build at all after importing the package, even if I roll back to a previous git commit.
     
  15. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello @AdrianForest , looks like you need to enable unity jar resolver support. since firebase already have it's imported by default. Also, auto-detection of unity jar resolver in a project is already planned for a first 2019 update.
     
  16. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    The 2018.9.6
    600-landscape.png

    CROSS-PLATFORM

    - Playmaker support & playmaker actions added.
    - Installation post-process external libraries search flow fix.
    - Settings window are now only repainted when a mouse is over.
    - Version label is now selectable.
    - Media Player API added.
    - Editor Services Icons update.
    - Vending API: now has an editor emulator client, and can be tested inside the Unity Editor.


    ANDROID
    - Save to gallery flow reworked
    - Date time picker minor adjustments

    IOS
    - UIKit: ISN_UIImagePickerController ImageURL property fix
    - UIKit: ISN_UIImagePickerController MediaURL & ImageURL path fixes
    - GameKit: Saved games save & load flow fixed
    - GameKit: Saved games ModificationDate property fixed
    - 2018.3 compilation warning fixes
     
  17. ByMikhail

    ByMikhail

    Joined:
    Oct 6, 2015
    Posts:
    6
    Hello, lacost. Can you help me with InAppPurchase module, please.
    If I deploy my project on Android device with RSA key is setup then when I invoke Connect method my app crashes. But If I set RSA to a random value then my app doesn't crash. I don't understand what I do wrong.
    P.S. I tried to add products in Google Play, get the RSA key and upload the apk. But anyway I have got app crashes.
     
  18. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    for advertisement non rewarded ads.
    Old plugin had OnClosed delegate.
    New plugin is missing OnClosed callback, i i need to check if interstitial has been closed to enable interaction in my app.
    In my experience the interstitial is Click Through so if u don't disable app interaction, ull interact with the game while tapping the interstitial.


    Also there's issue with Banner refreshing.
    I load banner successfully, IsReady is true. Banner is on screen, then later it disappears. maybe after 60 seconds. IsReady is still true.
    Does banner not auto refresh?
    Old plugin it auto refreshed.
     
    Last edited: Dec 20, 2018
  19. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @ByMikhail hey, sure. Can I have a full log, please?
     
  20. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @luniac thx for the feedback, I'll take a look on client API again and will get back to you.
     
  21. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    thank you.
    you can also email me at "itsallgoodgames@gmail.com" if you want.
     
  22. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    I'm also getting android permission requested on app launch even after modifying manifest manually at
    Plugins\StansAssets\NativePlugins\AndroidNativePro\Android\Core\an_library.bundle to remove
    Allow access photos, media and files on your device

    Unity automatically adds this permission as well:
    Allow to make and manage phone calls

    How do i get rid of these?
    old plugin i could remove file access permission request in android plugin settings.

    But the second request!!! phone calls!?!? that's a crazy request, i don't understand why this is being added!

    UPDATE:
    I just tested the final version of the OLD Ultimate Mobile again to check permissions.
    I can confirm there are no permissions requested.
    Old plugin allows to remove the permission Allow access photos, media and files on your device in android settings window.
    The Allow to make and manage phone calls does NOT pop up.
    So this means the new Pro version has files that trigger Unity to create the permission(maybe some AAR files?).

    This is a big issue.
     
    Last edited: Dec 20, 2018
  23. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    Ok i tested interstitial and besides the missing OnClosed callback, it works good.
    I tested Google Play Leaderboards and it works fine.
    But there's bug in plugin UI, my package name is matching correctly but it says not.
    Capture.PNG


    So to summarize all current issues i see:
    1)Unwanted permissions
    Allow access photos, media and files on your device
    Allow to make and manage phone calls

    2)Banner ad not auto-refreshing

    3)NonRewarded ad OnClosed callback needed.
    Can you confirm whether the unity activity is interactable or not through the NonRewarded ad? I'm not 100% sure. I think maybe it's paused.


    All my testing was done on Android device only.
     
    Last edited: Dec 21, 2018
  24. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @ByMikhail haven't header from you so far, please PM me if you still need some help.


    @luniac thx for sharing your feedback and sorry that I wasn't able to reply earlier, a bit of a crazy week :)

    With the ultimate mobile, you can always see the permissions that are requested by a plugin, take a look on a summary tab.
    So yea, permissions you talked about aren't coming from Ultimate Mobile. The manifest that is maintaine by a plugin located at:
    Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Android/Core/an_library.bundle/AndroidManifest.xml
    We can check your project together if you like and find where those guys are coming from.

    If I got your right you are using AdMob on Android. From what I know you do not need to refresh banner manually, you just set the refresh rate for the banner inside the Admob console.

    I am not sure either, besides I am planning to support a lot if differently ads services, so they might act differently.
    Having a close callback for NonRewarded ads is a very reasonable request, that's why it's already implemented. I will send you a new plugin version on e-mail.
     
  25. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I pretty sure this one is working properly, so really would like to take a look on your project content.
     
  26. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    I'm going to do more testing with an empty project and just ultimate mobile to see if i can recreate this permission issue. It's weird because i don't have any other plugins that deal with native stuff.

    In admob console it's set to "google optimized". This is not the issue because i tested the same banner ID using old ultimate mobile and new ultimate mobile. The old ultimate mobile banner auto refreshes but new ultimate mobile it disappears after around 60 seconds.

    Thanks.
     
    Last edited: Dec 23, 2018
  27. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    fixed this, the resource text didn't paste correctly the first time, thanks.
     
  28. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @luniac so you saying pretty much I need to do is to display a banner and it will auto disappear in a minute? I will definitely test it!
     
  29. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    yup.
    I also Debug.Logged Banner IsReady and once it was loaded and shown the first time, IsReady was true forever, even after banner disappeared.
     
  30. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    Ok so I 100% removed UMP from the project.
    I created android build and tested on android phone.
    It did not request any permissions as expected, because i have no native based plugins in my project.

    I then imported the latest UMP, and made new built.
    It requested the 2 permissions
    Allow access photos, media and files on your device
    Allow to make and manage phone calls

    The summary shows no permissions, and the manifest shows no permission.
    Capture.PNG

    These permissions are being added at Build Time.

    I'm testing now with empty project and will import UMP. I'm assuming it will be same result.
     
  31. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    Ok i created a new project,
    removed default unity packages(Unity ADS, Textmesh, etc),
    imported UMP,
    set android build settings to be like my project
    built and tested on my android device.

    Still requests 2 permissions:
    Allow access photos, media and files on your device
    Allow to make and manage phone calls

    I will email you the project.
     
  32. ByMikhail

    ByMikhail

    Joined:
    Oct 6, 2015
    Posts:
    6
    @lacost I'm sorry. That was my mistake.
    I have looked at the log of my app and fixed the problem.
    But now I think that I have not understood the plugin behaviour.
    As I know, apps published in Google Play should perform restoring purchases right after launching an app. What I did is calling the RestoreCompletedTransactions method from an Awake method.
    I have changed that code, but now I have noticed, that OnTransactionUpdated method is called when the app connects to the iap service. Is this behaviour implemented in the plugin only for Android devices?
     
  33. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @luniac I looked at your project. Here is what I found so far.
    Ultimate mobile android summary:
    Screenshot_122518_031520_PM.jpg

    Also, the was only one AndroidManifest.xml inside the project added y a plugin, that looks like:

    Code (CSharp):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.stansassets.androidnative">
    3.   <application>
    4.     <activity android:name="com.stansassets.core.utility.AN_ProxyActivity" android:launchMode="singleTask" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    5.   </application>
    6. </manifest>
    So there are no permissions inside the manifest as well and manifest it's actually the only one ability to add some permissions to a build.


    But once I checked build permissions here is what I have:
    Screenshot_122518_033528_PM.jpg

    Then I started to experiment what is causing it. Turns out it was caused by an EMPTY library project an_library.bundle that I use ONLY to be able to dynamically change the AndroidManifest.xml. This is actually the only reason why I have this project as a folder and not as compiled AAR.

    Once I removed it, that's my permissions list:
    Screenshot_122518_041118_PM.jpg
    Looks much better...
    So that looks to me as Unity issue. And also an ability to use a workaround. Remove an_library.bundle. + Disable manifest management inside the plugin settings, since it will re-create an_library.bundle project. But yea, you will need to then maintain manifest manually, and this isn't really recommended option. Only if you 100% sure what you are doing.

    But I then realized that project you sent me was configured to use an Internal(deprecated) build system, so I switched to Gradle. It with Gradle no matter if I have an empty an_library.bundle project or not, I will always have the same result - with is a lot better already. Here is what I got
    Screenshot_122518_041131_PM.jpg
    You may probably ask, but we do we still have this ones:
    Code (CSharp):
    1. uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE' maxSdkVersion='18'
    2. uses-permission: name='android.permission.READ_EXTERNAL_STORAGE' maxSdkVersion='18'
    Well, that actually leads us to another Unity wired behavior, I described here.

    Long story short -> use Gradle, it's better. The Internal build system most likely have a bug related to having an android project folder in a project, and since it's deprecated, I am sure it will not be fixed in a future version, most likely Internal will simply disappear. So better to use Gradle now anyway.
     
  34. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @ByMikhail
    Can you point me to that "rule" / "article" since I wasn't really aware of that. Buy, yea you can defiantly do this on Android.

    Okay

    So you mean OnTransactionUpdated method is called after you do RestoreCompletedTransactions? Or without you calling RestoreCompletedTransactions?
    What kind of transaction does it have? Since after you connect to billing service all transactions you haven't finished (due to app crash or any other reason) will be sent again. This way we are making sure you not going to lose any transactions.
     
  35. ByMikhail

    ByMikhail

    Joined:
    Oct 6, 2015
    Posts:
    6
    @lacost what about permissions, I have fixed this by adding the uses-sdk element to /Plugins/StansAssets/NativePlugins/AndroidNativePro/Android/Core/an_library.bundle/AndroidManifest.xml:
    <uses-sdk android:minSdkVersion="16" />
    And what I have gotten:
    InternalBuild.png
     
  36. ByMikhail

    ByMikhail

    Joined:
    Oct 6, 2015
    Posts:
    6
    @lacost hi :)

    I don't remember, but maybe this: https://stackoverflow.com/a/12187949

    OnTransactionUpdate method is called without calling RestoreCompletedTransactions.
    It is called after connection is completed, and it is called with the transaction purchased state.

    P.S. I'll try to build test project without using IAP adapter written by myself. Maybe it might to produce some bugs.
     
  37. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Can you please send me some logs?
    Also if a state is purchased... it makes me think that you haven't call FinishTransaction method. Are you sure you did it?
     
  38. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614

    Awesome, thanks for figuring it out.
    I didn't know Internal build was deprecated, wow.

    Have you been able to test the disappearing banner issue? that's the last problem for me.
     
  39. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @ByMikhail
    Wow that's nice... I actually missed it.
    It's great that it works, I wonder if it will also solve the issue from here.
    That's a nice catch, but I still feel like I don't want to add android:minSdkVersion="16" to the manifest generated by a plugin. Since it's not really up to a plugin to decide min SDK for your project right.
    @luniac check this out please, it's might be the exact workaround you need atm.


    According to that article, which can't be considered as google recommendation though :p


    So yea, check if you need to restore purchases. I mean to restore purchases every time does mean an overkill to me. You can check if the launched app is a freshly installed one, and it it is - > then yea, go for it and restore to purchases. Otherwise you good already.

    You may keep some PlayerPrefs value that will indicate for you if that is a fresh install or not.
    I also checked the code, and yea.. if you restore purchases, the OnTransactionUpdated has to be called. But the transaction sate should be UM_TransactionState.Restored. In case it does have a purchased state this means I have a bug. I will send you a file is more logs from android billing client, I would really appreciate if you can give it a try so I can 100% indicate where it's coming from.
     
  40. ByMikhail

    ByMikhail

    Joined:
    Oct 6, 2015
    Posts:
    6
    What actually you can do is adding minSdkVersion="4" and you allow to users decide which a min sdk version they should to use. :)
    MinSDKLog.png

    P.S. Resulted sdk version is set from Unity build settings. Because, It is greater than the version added to the manifest file.
     
    Last edited: Dec 26, 2018
  41. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @ByMikhail that's exactly what I did for a 2019.1 update! Thx!
     
    ByMikhail likes this.
  42. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey guys, Happy New Year!
    The 2019.1.7 version is now available on Asset Store!
    600-landscape.png

    This update is very important for me, and not only because this is a first updated in 2019. Finally, all the cross-platform services and API I had in mind for Ultimate Mobile is now implemented and available got using :)

    The Ultimate Mobile plugin, now not only have the cross-platform native API provided by iOS and Android platforms, based on Stan's Assets native plugins:
    But also there is a lot more 3-rd party services you can use via Ultimate Mobile:
    See the full 2019.1.7 update version notes below!

    CROSS-PLATFORM
    - Game Services. Added ability to load currently signed user avatar.
    - Game Services. Saved games use example & documentation.
    - In-Apps. Product CurrencyCode fixed for iOS.
    - Advertisement. Example scene enchantments.
    - Advertisement. Service guides URLs fixed.
    - Advertisement. Added an ability to enable to disable non-personalized ads for Google AdMob client.
    - Advertisement. Show callback is added to Non-rewarded ads client
    - Addon packages import improved.
    - Facebook. Analytics API added.
    - Analytics Service Added
    - Scripts inconsistent line endings fixed.
    - 2018.3 warning fixes.
    - Editor window animation fixed.
    - Scripts inconsistent line endings fixed.
    - 2018.3 warning fixes.
    - Editor window animation fixed.

    ANDROID
    - Google Play. Image Manager added.
    - Manifest Manager. Application template refactored.
    - Manifest Manager. Main manifest generation fixes.
    - minSdkVersion = 4 added to a plugin manifest to prevent Unity generate READ_PHONE_STATE permission when Internal Build system is used.
    - Settings tab spelling fixes.
    - Compatibility & Settings guides.
    - Native message handler initialization now happening when the native part is called for first time, instead of using unity runtime init callback, to prevent communication issues on when API methods called on Awake.
    - Firebase. Analytics API added.
    - Firebase. UI documentation links fix.

    IOS
    - User notifications example scene improvements.- UIKit. Camera API. Image compression fixed.
    - UIKit. ISN_UIAlertAction added an ability to attach images.
    - GameKit. Saved Games API, now automatically enables iCloud documents & storage inside the XCode project configuration.
    - GameKit. ISN_GKPlayer added an ability to load a plater photo.
     
    ByMikhail likes this.
  43. Quit

    Quit

    Joined:
    Mar 5, 2013
    Posts:
    63
    Hey @lacost I just installed the plugin and my game builds fine. I use Unity jar resolver and I enabled Local Notifications for android. When I try to use Android Local Notifications by just calling

    Code (CSharp):
    1. var client = UM_NotificationCenter.Client;
    2. client.RemoveAllDeliveredNotifications();
    My game crashes and I get this:

    Code (CSharp):
    1. 01-09 21:07:05.766  7411  7500 E Unity   : AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.app.Activity.getSystemService(java.lang.String)' on a null object reference
    2. 01-09 21:07:05.766  7411  7500 E Unity   : java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.app.Activity.getSystemService(java.lang.String)' on a null object reference
    3. 01-09 21:07:05.766  7411  7500 E Unity   :      at com.stansassets.android.app.notifications.AN_NotificationManager.CancelAll(AN_NotificationManager.java:29)
    4. 01-09 21:07:05.766  7411  7500 E Unity   :      at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    5. 01-09 21:07:05.766  7411  7500 E Unity   :      at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    6. 01-09 21:07:05.766  7411  7500 E Unity   :      at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
    7. 01-09 21:07:05.766  7411  7500 E Unity   :      at android.os.MessageQueue.next(MessageQueue.java:395)
    8. 01-09 21:07:05.766  7411  7500 E Unity   :      at android.os.Looper.loop(Looper.java:160)
    9. 01-09 21:07:05.766  7411  7500 E Unity   :      at com.unity3d.player.UnityPlayer$e.run(Unknown Source:32)
    10. 01-09 21:07:05.766  7411  7500 E Unity   :   at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
    11. 01-09 21:07:05.766  7411  7500 E Unity   :   at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00000] in
    12. 01-09 21:07:05.780  7411  7500 D AndroidNative: Handler registred
    13. 01-09 21:07:05.784  7411  7500 D AndroidNative: StrictMode set
    Any ideas why it would be like this? I use v2018.8.4 UltimateMobilePro, and 2018.3f2 Unity.

    Thanks,
    Arnold.
     
  44. Quit

    Quit

    Joined:
    Mar 5, 2013
    Posts:
    63
    Apparently, updating to the newest version stopped the crash from happening. However, the local notifications still do not work. I shall investigate this if that's on my part.

    EDIT:

    It works now. I get local notifications on Android. I schedule 5 of them 5 seconds apart from each other, so it's 5, 10, 15, 20, 25 seconds after the app has been closed. However, I only get the last one at 25seconds. None of the other 4 are fired for some reason :( Any ideas why?
     
    Last edited: Jan 10, 2019
  45. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey, @Quit so the crash log you provided above does not happen anymore, but notifications still d not work?

    If I got you right can you please give your implementation code + logcat log from your device. Thanks in advance.
     
  46. PhilippeDu60

    PhilippeDu60

    Joined:
    Mar 5, 2013
    Posts:
    25
    Hello,

    how to handle multiplayer now ?
     
  47. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @PhilippeDu60 hey, no multiplayer.
    Reasons:
    • Expensive to create, expensive to support, but if requests keep coming I will definitely make it
    • Not much people actually need/using it
    • Unity is making own awesome multiplayer solutions that are already available for preview... I don't think it's wise to compete with unity :)
     
  48. PhilippeDu60

    PhilippeDu60

    Joined:
    Mar 5, 2013
    Posts:
    25
    thanks for your quickly answer.
     
  49. Quit

    Quit

    Joined:
    Mar 5, 2013
    Posts:
    63
    No more crashes. Update to the newest version fixed it. I guess it was not working in the version I had.

    The notifications are scheduled now. That's the code I use.

    Code (CSharp):
    1.         private void OnApplicationPaused(GamePausedNotification notification) {
    2.             ScheduleNotif(5);
    3.             ScheduleNotif(10);
    4.             ScheduleNotif(15);
    5.             ScheduleNotif(20);
    6.             ScheduleNotif(25);
    7.         }
    8.  
    9.         private void ScheduleNotif(long time) {
    10.  
    11.  
    12.             UM_Notification content = new UM_Notification();
    13.  
    14.             content.SetTitle("Title: " + time);
    15.             content.SetBody("Body message: " + time);
    16.             //content.SetSmallIconName("myIcon.png");
    17.             //content.SetSoundName("mySound.wav");
    18.  
    19.             UM_TimeIntervalNotificationTrigger trigger = new UM_TimeIntervalNotificationTrigger(time);
    20.             UM_NotificationRequest requets = new UM_NotificationRequest(1, content, trigger);
    21.  
    22.             var client = UM_NotificationCenter.Client;
    23.  
    24.             client.AddNotificationRequest(requets, (result) => {
    25.                 if(result.IsSucceeded) {
    26.                     UnityEngine.Debug.Log("scheduled successfully - vuolia!!!: " + time);
    27.                     //Notification was successfully scheduled
    28.                 } else {
    29.                     //There was an isseu with scheduling
    30.                     UnityEngine.Debug.Log(result.Error.FullMessage);
    31.                 }
    32.             });
    33.  
    34.         }
    All of them print out "scheduled successfully - vuolia!!!: 5, 10, 15, 20, 25" in a logcat. However, I only see the notification with number 25 in it.

    EDIT:

    Apparently, I missed the part where it said ID had to be unique. Since changing it from 1 to a unique number, notifications started working.

    Sorry to bother you. Thanks. Amazing product - by the way.
     
  50. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Glad you were able to solve it,
    Yea the id is your way to control notification. For example, if you want to cancel it before it even appeared for a user.