Search Unity

Easy Mobile - Many-in-one package for mobile games

Discussion in 'Assets and Asset Store' started by pt5011, Jan 28, 2017.

  1. trinistry

    trinistry

    Joined:
    Feb 2, 2014
    Posts:
    15
    Hi,
    thanks for making this great asset!
    I've got a question, will you support the new in-app review system for Android? It seems it doesn't allow the current flow (which I rather like tbh) anymore because it says

    > Your app should not ask the user any questions before or while presenting the rating button or card, including questions about their opinion (such as “Do you like the app?”) or predictive questions (such as “Would you rate this app 5 stars”)

    https://developer.android.com/guide/playcore/in-app-review
     
  2. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi, thanks for bringing this up. Seems like a cool feature to be added :)
     
    trinistry likes this.
  3. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    I deleted and installed the latest version 2.7.4. It says
    its this line string propName = flagSettings.enumName;
    I use Unity version 2020.1.2f1
     
  4. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    @MaZy I've just opened EMP 2.7.4 in Unity 2020.1.3f1 and didn't really see the error. Is there any particular step to trigger it?
     
  5. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    I used it on fresh project too. There is no error. If I compare both the "using EasyMobile.Internal" is grayed out in visual studio.
    But I found out from where the error comes. Its one script which uses same name "EnumFlagsAttribute" but has no namespace. However. I don't get why compiler or visual studio does not use EnumFlags form EasyMobile namespace. I needed to remove the other script.
     
    pt5011 likes this.
  6. -chris

    -chris

    Joined:
    Mar 1, 2012
    Posts:
    99
    Is there a way to import, or edit, the list of achievement IDs that Easy Mobile Pro knows about?

    I don't really fancy clicking and typing 80+ achievements one-by-one...

    Things are saved within the EM_Settings.asset file I take it? But it's all binary :(
     
  7. -chris

    -chris

    Joined:
    Mar 1, 2012
    Posts:
    99
    Additionally...

    Enabling Unity's IAP service and running its IAP installer results in Easy Mobile Pro giving errors:



    Easy Mobile Pro 2.7.4
    Unity 2019.4.2f1
     
  8. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    After publishing the Android release build I found some crashes in Firebase Crashlytics dashboard caused by EM gallery image pick module on Samsung Galaxy A10
    Here is a log:
    Code (CSharp):
    1. Fatal Exception: java.lang.Error: FATAL EXCEPTION [main]
    2. Unity version     : 2019.3.15f1
    3. Device model      : samsung SM-A105F
    4. Device fingerprint: samsung/a10dd/a10:10/QP1A.190711.020/A105FDDU3BTF1:user/release-keys
    5.  
    6.  
    7. Caused by java.lang.RuntimeException: Unable to resume activity {com.triviagamesaps.triviafight/com.sglib.easymobile.androidnative.media.GalleryActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=201, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:9604 flg=0x1 }} to activity {com.triviagamesaps.triviafight/com.sglib.easymobile.androidnative.media.GalleryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.app.Activity.getPackageName()' on a null object reference
    8.        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4451)
    9.        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4483)
    10.        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
    11.        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
    12.        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    13.        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2175)
    14.        at android.os.Handler.dispatchMessage(Handler.java:107)
    15.        at android.os.Looper.loop(Looper.java:237)
    16.        at android.app.ActivityThread.main(ActivityThread.java:7860)
    17.        at java.lang.reflect.Method.invoke(Method.java)
    18.        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    19.        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
    20.  
    21.  
    22.  
    23. Caused by java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=201, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:9604 flg=0x1 }} to activity {com.triviagamesaps.triviafight/com.sglib.easymobile.androidnative.media.GalleryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.app.Activity.getPackageName()' on a null object reference
    24.        at android.app.ActivityThread.deliverResults(ActivityThread.java:5143)
    25.        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4438)
    26.        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4483)
    27.        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
    28.        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
    29.        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    30.        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2175)
    31.        at android.os.Handler.dispatchMessage(Handler.java:107)
    32.        at android.os.Looper.loop(Looper.java:237)
    33.        at android.app.ActivityThread.main(ActivityThread.java:7860)
    34.        at java.lang.reflect.Method.invoke(Method.java)
    35.        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    36.        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
    37.  
    38.  
    39.  
    40.  
    41.  
    42. Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.app.Activity.getPackageName()' on a null object reference
    43.        at com.sglib.easymobile.androidnative.media.GalleryActivity.onActivityResult(GalleryActivity.java:83)
    44.        at android.app.Activity.dispatchActivityResult(Activity.java:8292)
    45.        at android.app.ActivityThread.deliverResults(ActivityThread.java:5136)
    46.        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4438)
    47.        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4483)
    48.        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
    49.        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
    50.        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    51.        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2175)
    52.        at android.os.Handler.dispatchMessage(Handler.java:107)
    53.        at android.os.Looper.loop(Looper.java:237)
    54.        at android.app.ActivityThread.main(ActivityThread.java:7860)
    55.        at java.lang.reflect.Method.invoke(Method.java)
    56.        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    57.        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)

    Any suggestions why this happens?
     
  9. Aquablue

    Aquablue

    Joined:
    Dec 15, 2013
    Posts:
    11
    @pt5011 I'm unable to build a Unity project that includes Easy Mobile Pro on a Mac machine.

    Here below I describe the reason.

    First start with the preconditions:
    1. macOS Catalina is installed (not tested if the bug is present on prior versions of macOS).
    2. The Java SDK has not been installed by hand.
    3. Use Unity 2019.3 or above (not tested with previous versions of Unity) and install the "Android Build Support" module and all sub-modules.
    Then what happens:
    The "EM_BuildProcessorUtil.PreBuildProcessing" method found in "EM_BuildManager.cs" will be triggered as pre-build step. This method calls "EM_EditorUtil.GetJdkPath()" which isn't unable to find the JDK path.

    Here's the code of the buggy method:
    Code (CSharp):
    1. public static string GetJdkPath(bool verboseLog = false)
    2.         {
    3.             var jdkPath = UnityEditor.EditorPrefs.GetString("JdkPath");
    4.  
    5.             if (string.IsNullOrEmpty(jdkPath))
    6.             {
    7.                 if (verboseLog)
    8.                     Debug.Log(
    9.                         "Unity 'Preferences > External Tools > Android JDK' path is not set. " +
    10.                         "Falling back to JAVA_HOME environment variable.");
    11.                 jdkPath = System.Environment.GetEnvironmentVariable("JAVA_HOME");
    12.             }
    13.  
    14.             return jdkPath;
    15.         }
    Here's why the JDK can't be found:
    Code (CSharp):
    1. var jdkPath = UnityEditor.EditorPrefs.GetString("JdkPath");
    will return null on recent versions of Unity as the JdkPath will not be set since at least Unity 2018 on mac and Windows machines.

    Then, as the last piece of codes doesn't find anything, this line will be executed:
    Code (CSharp):
    1. jdkPath = System.Environment.GetEnvironmentVariable("JAVA_HOME");
    JAVA_HOME is not set by default on the recent versions of macOS, so the above line of code will also return null and consequently the "EM_BuildProcessorUtil.PreBuildProcessing" will throw an exception as "EM_EditorUtil.GetJdkPath()" returns null.


    May I suggest to patch your "EM_EditorUtil.cs" code?

    Add this after all the using declarations (or wherever you like ;) )

    Code (CSharp):
    1. #if UNITY_ANDROID
    2. using UnityEditor.Android;
    3. #endif
    This will prevent to get compilations error on Unity versions for which the Android modules haven't been installed.

    Then modify the "EM_EditorUtil.GetJdkPath()" method like shown below:

    Code (CSharp):
    1. public static string GetJdkPath(bool verboseLog = false)
    2.         {
    3.             var jdkPath = UnityEditor.EditorPrefs.GetString("JdkPath");
    4.  
    5. #if UNITY_ANDROID && UNITY_2019_3_OR_NEWER
    6.             if (string.IsNullOrEmpty(jdkPath))
    7.             {
    8.                 jdkPath = AndroidExternalToolsSettings.jdkRootPath;
    9.             }
    10. #endif
    11.  
    12.             if (string.IsNullOrEmpty(jdkPath))
    13.             {
    14.                 if (verboseLog)
    15.                     Debug.Log(
    16.                         "Unity 'Preferences > External Tools > Android JDK' path is not set. " +
    17.                         "Falling back to JAVA_HOME environment variable.");
    18.                 jdkPath = System.Environment.GetEnvironmentVariable("JAVA_HOME");
    19.             }
    20.  
    21.             return jdkPath;
    22.         }
    The line "#if UNITY_ANDROID && UNITY_2019_3_OR_NEWER" could also be simplified with "#if UNITY_2019_3_OR_NEWER" if we are sure that the "EM_EditorUtil.GetJdkPath()" method gets only called when the build target is Android. Which should be the case.. but well, we humans make mistakes and write bugs so I added "UNITY_ANDROID" just in case ;)
     
    pt5011 likes this.
  10. Ambience

    Ambience

    Joined:
    Aug 14, 2018
    Posts:
    1
    I have the same problem on 2019.4.1f1
    Updated to 2019.4.9f1 but nothing changed, the problem still shows up.
    I commented those lines out. At least it's building now.

     
    Last edited: Sep 2, 2020
    -chris likes this.
  11. tonythedad

    tonythedad

    Joined:
    Apr 5, 2020
    Posts:
    12
    I have followed the TicTacToe and KitchenSink demos but CreateQuickMatch won't actually match players, it puts 2 players in different rooms. Can anyone help!??
     
  12. tonythedad

    tonythedad

    Joined:
    Apr 5, 2020
    Posts:
    12
    nevermind, apparently you have to also call TakeTurn first to match an opponent.
     
    pt5011 likes this.
  13. ThatOdieGuy

    ThatOdieGuy

    Joined:
    Mar 13, 2016
    Posts:
    7
    "Default ad network UnityAds has no SDK. Please import its plugin."
    I'm getting this message on the Easy Mobile Ads settings when "Unity Ads" is selected as a default ad network. I see that it is checking UNITY_ADS and not UNITY_MONETIZATION

    Is this ok to ignore? Looking at the code, it seems like it doesn't really affect anything, I'm just getting a warning. Or is there something wrong?
     
  14. -chris

    -chris

    Joined:
    Mar 1, 2012
    Posts:
    99
    The online docs for Easy Mobile's API has some sort of JavaScript high CPU usage leak, noticeable in both Chrome and Firefox.

    Disabling JavaScript resolves the issue, but then the site doesn't work ¯\_(ツ)_/¯
     
  15. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Thanks for the information, we'll take a look at this soon.
     
  16. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Thanks for reporting this. We'll check it out.
     
  17. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Have you checked this? https://www.easymobile.sglibgames.c...as-unavailable-in-advertising-module-settings
     
  18. Raikish

    Raikish

    Joined:
    Mar 19, 2019
    Posts:
    5
    Hi, I have the same error as @Ambience in unity 2019.4.5f1
    I found inside of the Changelog file in Plugins/UnityPurchasing that CloudMoolah Tizen and others were removed because was deprecated, this can be the error?? upload_2020-9-7_13-30-16.png
     
  19. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    We are switching from Prime31 to Easy Mobile Pro, so far the plugin is great and easy to use.

    Here are some suggestions for improvement we want to chip in:
    1. Selecting achievement Android ID is pretty tedious. I have 100+ achievements in games and selecting one by one (sorted by name, not in Google console order) is actually worse than simply pasting the string ID.

    I would suggest having an option to pasting the string ID instead of selecting one.

    2. After adding a new achievement, it should be expanded so I can type the name directly next. Just saving 1 click each time.

    3. In most cases, achievements are in a group but have different requirements. For example, play 10 games, play 100 games, etc.
    We already have a custom manager to do it but it would be great if EMP already has similar thing build in.
    Example:
    I simply need to call this at end game and it checks all play X games achievements and reports the one meeting the requirement.
    Code (CSharp):
    1. AchievementManager.Report(Achievement.PlayGames, totalGamePlayed);
     
    Last edited: Sep 14, 2020
  20. tigerss

    tigerss

    Joined:
    Oct 11, 2015
    Posts:
    20
  21. IceTrooper

    IceTrooper

    Joined:
    Jul 19, 2015
    Posts:
    36
    Can you show a code snippet how can I wait for user response when manual deciding of what saved game version to use?
    I want to show the user a popup on the opening game save with my two properties "last modified" and "playtime" for base and remote and then two buttons to decide which saved game to use.
    I saw this code in demo, but I don't know how to modify it to wait for user's button response:

    Code (CSharp):
    1.             // Open with manual conflict resolution: we'll pick the one with longest playtime
    2.             GameServices.SavedGames.OpenWithManualConflictResolution(name, true,
    3.                 (baseGame, baseData, remoteGame, remoteData) =>
    4.                 {
    5.                     Debug.Log("Manually resolve conflict of saved game " + baseGame.Name);
    6.                     var baseDataObj = ByteArrayToSavedGameData(baseData);
    7.                     var remoteDataObj = ByteArrayToSavedGameData(remoteData);
    8.  
    9.                     Debug.LogFormat("Base value {0}; Remote value {1}", baseDataObj.demoInt, remoteDataObj.demoInt);
    10.                     return baseDataObj.demoInt >= remoteDataObj.demoInt ? SavedGameConflictResolutionStrategy.UseBase : SavedGameConflictResolutionStrategy.UseRemote;
    11.                 },
    12.                 callback);
     
  22. HOWHOWW

    HOWHOWW

    Joined:
    Aug 23, 2017
    Posts:
    1
    I'm using AD autoload, but I always get this error.
    (Facebook Audience Network, Admob, Easy Mobile 2.8.0, Unity 2019.4.10)
    cant find this specific error anywhere so cant find its solution.


    Exception: Field currentActivity or type signature not found
    UnityEngine._AndroidJNIHelper.GetFieldID (System.IntPtr jclass, System.String fieldName, System.String signature, System.Boolean isStatic) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:1446)
    UnityEngine.AndroidJNIHelper.GetFieldID (System.IntPtr javaClass, System.String fieldName, System.String signature, System.Boolean isStatic) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJNI.bindings.cs:79)
    UnityEngine._AndroidJNIHelper.GetFieldID[ReturnType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:1359)
    UnityEngine.AndroidJNIHelper.GetFieldID[FieldType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJNI.bindings.cs:172)
    UnityEngine.AndroidJavaObject._GetStatic[FieldType] (System.String fieldName) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:663)
    UnityEngine.AndroidJavaObject.GetStatic[FieldType] (System.String fieldName) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:274)
    AudienceNetwork.AudienceNetworkAds.IsInitialized () (at Assets/AudienceNetwork/Library/AudienceNetworkAds.cs:33)
    AudienceNetwork.AudienceNetworkAds.Initialize () (at Assets/AudienceNetwork/Library/AudienceNetworkAds.cs:15)
    AudienceNetwork.RewardedVideoAd..ctor (System.String placementId, AudienceNetwork.RewardData rewardData) (at Assets/AudienceNetwork/Library/RewardedVideoAd.cs:187)
    AudienceNetwork.RewardedVideoAd..ctor (System.String placementId) (at Assets/AudienceNetwork/Library/RewardedVideoAd.cs:180)
    EasyMobile.AudienceNetworkClientImpl.CreateNewRewardedVideoAd (System.String rewardedId, EasyMobile.AdPlacement placement) (at Assets/EasyMobile/Scripts/Modules/Advertising/NetworkClients/AudienceNetworkClientImpl.cs:957)
    EasyMobile.AudienceNetworkClientImpl.InternalLoadRewardedAd (EasyMobile.AdPlacement placement) (at Assets/EasyMobile/Scripts/Modules/Advertising/NetworkClients/AudienceNetworkClientImpl.cs:594)
    EasyMobile.AdClientImpl.LoadRewardedAd (EasyMobile.AdPlacement placement) (at Assets/EasyMobile/Scripts/Modules/Advertising/NetworkClients/AdClientImpl.cs:400)
    EasyMobile.Advertising.LoadRewardedAd (EasyMobile.IAdClient client, EasyMobile.AdPlacement placement) (at Assets/EasyMobile/Scripts/Modules/Advertising/Advertising.cs:1073)
    EasyMobile.Advertising.LoadRewardedAd () (at Assets/EasyMobile/Scripts/Modules/Advertising/Advertising.cs:620)
    EasyMobile.Advertising+<CRAutoLoadDefaultAds>d__121.MoveNext () (at Assets/EasyMobile/Scripts/Modules/Advertising/Advertising.cs:861)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    EasyMobile.Advertising:set_AutoAdLoadingMode(AutoAdLoadingMode) (at Assets/EasyMobile/Scripts/Modules/Advertising/Advertising.cs:418)
    EasyMobile.Advertising:Start() (at Assets/EasyMobile/Scripts/Modules/Advertising/Advertising.cs:294)
     
  23. IceTrooper

    IceTrooper

    Joined:
    Jul 19, 2015
    Posts:
    36
    Is it possible to change the metadata of saved games? (Like DeviceName, CoverImageURL, TotalTimePlayed, Description, etc). If yes, how?
     
  24. zacra

    zacra

    Joined:
    Mar 19, 2016
    Posts:
    1


    I ran into the same problem. How did you solve it?
     
  25. Hornkvern

    Hornkvern

    Joined:
    Mar 6, 2020
    Posts:
    7
    Im getting a error in my console..

    "UnityException: Load is not allowed to be called from a MonoBehaviour constructor (or instance field initializer), call it in Awake or Start instead. Called from MonoBehaviour 'AdManager'.
    See "Script Serialization" page in the Unity Manual for further details."




    This is my script: https://hatebin.com/vcgvrkepts

    The script is attached to a gameobject in the scene

    What am i doing wrong here?
     
    Last edited: Oct 2, 2020
  26. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi @Hornkvern Can you reproduce the error with our AdvertisingDemo scene?
     
  27. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Please contact our support service. Thanks.
     
  28. Hornkvern

    Hornkvern

    Joined:
    Mar 6, 2020
    Posts:
    7

    No clue how to do that, but it does not happen in the demo scene.

    And that script is the only one that use easymobile


    EDIT:

    Okey, it seems that these lines at the start of the script is the reason of the "Load" error

    bool isRewardReady = Advertising.IsRewardedAdReady();
    bool isFullScreenReady = Advertising.IsInterstitialAdReady();

    added it to your AdvertisingDemo as well and i managed to reproduce the error.

    Seems weird that you have this in your documentation when it clearly does not work

    Last error i have is this:



    It happens whenever i close an rewarded Ad or InterstitialAd

    And yes, i have

    private void Awake()
    {
    if (RuntimeManager.IsInitialized())
    {
    RuntimeManager.Init();
    }
    }

    on my start scene script
     
    Last edited: Oct 2, 2020
  29. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    Does AdMob for iOS work in the latest versions? Seems like it couldn't build for ios14

    Also for android: get these when starting up and then ads don't show


    Code (CSharp):
    1. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker java.lang.IllegalArgumentException: Service not registered: lw@93ede04
    2. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1570)
    3. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at android.app.ContextImpl.unbindService(ContextImpl.java:1702)
    4. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at android.content.ContextWrapper.unbindService(ContextWrapper.java:727)
    5. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at ci.b(:com.google.android.gms.dynamite_measurementdynamite@203615063@20.36.15 (100306-0):1)
    6. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at ci.a(:com.google.android.gms.dynamite_measurementdynamite@203615063@20.36.15 (100306-0):6)
    7. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at lx.A(:com.google.android.gms.dynamite_measurementdynamite@203615063@20.36.15 (100306-0):10)
    8. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at lh.a(:com.google.android.gms.dynamite_measurementdynamite@203615063@20.36.15 (100306-0):3)
    9. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at eb.run(:com.google.android.gms.dynamite_measurementdynamite@203615063@20.36.15 (100306-0):3)
    10. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
    11. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    12. 2020/10/05 03:14:42.964 19617 20181 Warn ConnectionTracker     at ja.run(:com.google.android.gms.dynamite_measurementdynamite@203615063@20.36.15 (100306-0):6)
    13.  
     
    Last edited: Oct 5, 2020
  30. Jasinka

    Jasinka

    Joined:
    Oct 18, 2016
    Posts:
    50
    Hello,

    I am using Easy Mobile + Playmaker for IAP.
    In my editor Initialized is working perfect. But when exporting to APK, i can't get it working. I need Google Play settings or it should Initialized without "Backened" on GPlay? Maybe some settings is missing....
    Thanks for respond in advance.
     
  31. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    467
    I was having a nagging error I wanted to correct, which is like those reported here.
    I updated GooglePlayGames (link) to v10.11 (September 3) but I got over 50 errors! As far as I can remember, all of them were related to the multiplayer support.
    For some reasons, the GooglePlayGames folder had to be deleted before updating it (according to a reply here). I did this then because forcing the resolver wasn't resolving anything at all.
    I cannot explain what went on, especially since I was working with the 10.09 thus far (as per the master file's changelog), but I deleted that folder and then redid the update with the unitypackage gotten on github.
    Now, I have EMP that throws a total of 14 errors.
    They are all relevant to the multiplayer (again) and all are variants of this:

    There's a missing reference in all cases.
    I switched EMP's Game Services support on and off and on again, the errors keep returning. It even tells me that Google Play Games plugin is required, but it's precisely what I just installed.
    No amount of resolving seems to correct the problem.
    Switching the EMP Game Services off is the only way thus far to make this stop. Could it be that the plugin has lost its way in pointing to the proper places in the library or something?

    EDIT: I might be able to solve this. Deleting some folders, reimporting everything, restarting Unity, resolving this and that again, etc. What a mess! I'm doing tests on a temporary project atm, will see if I can reproduce and solve this on the main one.
     
    Last edited: Oct 9, 2020
  32. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    +1 for feature request of supporting UDP IAP.
     
  33. YoNeyers

    YoNeyers

    Joined:
    Feb 10, 2017
    Posts:
    32
    hey i have kinda a bug when i want to load score from leaderboard.
    Code (CSharp):
    1. LoadScores failed: com.google.android.gms.games.FriendsResolutionRequiredException: 26703: CONSENT_REQUIRED
    2.  
    3. UnityEngine.Debug:Log(Object)
    4. GooglePlayGames.Android.<>c__DisplayClass59_0:<LoadScores>b__1(AndroidJavaObject) (at Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs:1011)
    5. GooglePlayGames.Android.<>c__DisplayClass57_0:<AddOnFailureListenerWithSignOut>b__0(AndroidJavaObject) (at Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs:927)
    6. GooglePlayGames.Android.TaskOnFailedProxy:onFailure(AndroidJavaObject) (at Assets/GooglePlayGames/Platforms/Android/AndroidTaskUtils.cs:106)
    7. UnityEngine._AndroidJNIHelper:InvokeJavaProxyMethod(AndroidJavaProxy, IntPtr, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:964)
    and it will say you don't have any score reported to leaderboard.
    i did the same as you did in your video (Easy Mobile Tutorials | Game Services).
     
  34. noahx

    noahx

    Joined:
    Nov 22, 2010
    Posts:
    77
    Hi. Simple question, How can I disable ads/Advertising module with a property or something? When a player pays to remove ads, I don't want any additional processing in the background auto loading ads that are never going to be used because I'm no longer going to show them to those specific paid users.

    I can't find a property or something to indicate to the Advertising module to stop auto loading ads or to disable the whole module by scripting.

    Thanks.
     
  35. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    69
    I am getting below error when i click play. i activated admob interstitial ads using playmaker. Scene : AdvertisingDemo_PlayMaker
    upload_2020-10-23_20-6-47.png
     
  36. Deleted User

    Deleted User

    Guest

    Hi, I have all my external assets in the Plugins folder to keep my root folder clean. For this I set the RootPath to Assets/Plugins/EasyMobile in EM_Constants.cs

    Works all fine except for one thing: Editor/EasyMobileDependencies.xml doesn't use this root path, it would be great if you could update the file automatically when the root path is changed, it cost me quite some time to find out why my android build was failing.

    Edit: there also seems to be some path hardcoding in EM_AndroidManifestBuilder::GenerateManifest and some other places (search for [FileIO.ToAbsolutePath("EasyMobile/"] ...)

    Edit 2: newer gradle versions also seem to dislike the version notation in EasyMobileDependencies.xml (com.sglib.easymobile:easy-mobile:1.+) and want to have explicit version numbers specified.
     
    Last edited by a moderator: Oct 27, 2020
    Starbox likes this.
  37. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    467
    I'm encountering severe building issues that prevent Gradle from going through the building process.
    I have removed all ads SDK I planned using, streamlining the app to UnityAds (package version) and management through Easy Mobile (Pro). At least I hope solving this before trying those other advertising networks.
    Mentions are made about an impossibility in merging dex files. The issue hinges around duplicate classes.
    I'm not posting the whole log report here.
    I'm also putting this here because I noticed it at the top of the warning lists and it might actually be important.
    Can this mess up Easy Mobile?
    This is absolutely beyond my own skillset to solve.
    Fix dependency resolution errors
    This is not easy to understand.
    Here's the custom properties file that I had Unity generate for me in the Plugins/Android folder.
    Is there anything wrong with those lines? Is the + symbol creating an issue here?
    Code (xml):
    1. dependencies {
    2.     implementation fileTree(dir: 'libs', include: ['*.jar'])
    3. // Android Resolver Dependencies Start
    4.     implementation 'com.android.support:appcompat-v7:24.0.+' // Assets/EasyMobile/Editor/EasyMobileDependencies.xml:34
    5.     implementation 'com.android.support:support-v4:26.1.+' // Assets/EasyMobile/Editor/EasyMobileDependencies.xml:28
    6.     implementation 'com.google.android.play:core:1.8.+' // Assets/EasyMobile/Editor/EasyMobileDependencies.xml:22
    7.     implementation 'com.google.games:gpgs-plugin-support:0.10.11' // Assets/GooglePlayGames/Editor/GooglePlayGamesPluginDependencies.xml:11
    8.     implementation 'com.sglib.easymobile:easy-mobile:1.+' // Assets/EasyMobile/Editor/EasyMobileDependencies.xml:40
    9. // Android Resolver Dependencies End
    10. **DEPS**}
     
  38. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    467
    Unrelated to the building issues, I had this today. Do not read this as more than a simple report on some bugs that might prove useful for anyone being surprised by the same problems.
    By curiosity I deleted the Library folder to let Unity rebuild it. The Console threw me two errors:
    I didn't have those before the Library purge. I then deleted the PlaymakerDemo folder that contains the scripts causing these issues.
    A new error happened.
    So I deleted that script too. Thus far I was not having any more errors but this was not a suitable situation. So I then proceeded to reimport the whole of EasyMobile from the Asset Store. I saw a new update today so I updated to 2.9 and downloaded it.
    Once most of the importation was done, I was prompted to delete the PlayServicesResolver. I suppose third party devs still put it in their asset packs because there's no guarantee that a studio is using the newer ExternalDependenciesManager from Unity's internal packages (I do though).
    I pressed yes, PSR was removed.
    Then I went to (re)install Playmaker actions which also contain the PlaymakerDemo that was causing issues earlier on.
    No more extra errors but I got a warning and now I pay more attention to them, especially when they mention things about building errors.
    I work on MacOS Mojave.
    This a warning I saw many times and it never caused any issue before but now I'm thinking such warnings could be of interest since this one is relative to the script that gave me the third error reported above.
     
  39. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Hi there! Unity 2019 lts the latest. Easy Mobile the latest. Nothing selected, i'm using only
    StoreReview.RequestRating();
    Got errors while android build
    https://pastebin.com/SNtLNWG0
     
  40. dayjur

    dayjur

    Joined:
    Sep 6, 2014
    Posts:
    128
    Whenever I import ezmobiolepro in Andorid i always get Picked up _JAVA_OPTIONS: -Xverify:none console error
    so Icannot build and run only build
     
  41. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    Feature Request:

    I would be great to have a callback on the share functions that tells us if it was successful and how it was shared. Native Share has this and I use it to reward the user for sharing.

    Thanks
     
  42. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    467
    Google is definitely pushing its new Play Console interface and separating the OAuth set up process, requiring a few extra steps to be completed outside of the Play Console.
    Both the current sgLib Youtube tutorial and the documentation do not fit with these changes.
    The Play Console's UI is quite different from the old one (they put an option down the left column to switch back to the old one but it does not work), and now the process to integrate GPS is slightly longer and if one is not careful, it is easy to thrown into a complicated maze of configurations that are not required (if this happens, you're not doing it right).
    The OAuth system already was mandatory, it still requires at least one Credential (in this case, "Android").
    Logically if you go to the API dashboard from the Play Console, the app identity you created will already be loaded into the top bar in the API dashboard (check the top bar to see the app's name). This is important because the documentation warns us:

    FWIW, I found a video that explains how to proceed and another one that's more detailed, featuring the new UI.

    A little further documentation would be interesting regarding the following options:
    • Request Server OAuth code
    • OAuth scopes
    • Web App Client ID
    There is also a message that says EMP does not require a Web Client ID for Game Services and frankly I would not see the point of it for a mobile game, but the shorter video tutorial had its author actually creating such an ID and putting it into Unity too for his Android app (so he has in total two IDs, one 'Android' and one 'Web').
    I sincerely don't understand why they'd do that unless their app would be hosting content on another server.
     
    EgoJacky likes this.
  43. roshan090

    roshan090

    Joined:
    Mar 20, 2018
    Posts:
    35
    AdMob interstitial ad failed to load. Error: on my xcode debug.
    But in the editor I am getting this AdMob client has been initialized.
     
  44. roshan090

    roshan090

    Joined:
    Mar 20, 2018
    Posts:
    35
  45. kingdual

    kingdual

    Joined:
    Sep 12, 2020
    Posts:
    2
    @pt5011 I use this video to add in-app purchase to my game (Android):


    I follow all steps but not work.

    inside Unity if I click button for purchasing coin it work and coin grow up, but in my phone (downloading the game from google play for internal test "alpha") if I click the same button nothings appens and the windows about purchasing from google play not show, so why? How I can fix it? please help me!!! thanks

    P.s. I use Easy Mobile Pro purchased last month :)
     
  46. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    467
    There is a method (PM action) to check if the Advertising module is activated.
    But if it returns no, I cannot find a way to force-activate it. Which means that if for some reason, the initialization failed, it will remain this way until the app restarts. All I can do for now is just save the module's status in a boolean and disable all ad systems if its value is false.
     
  47. kingdual

    kingdual

    Joined:
    Sep 12, 2020
    Posts:
    2
    I try this demo and I have this error but I select auto init on easy mobile pro settings
    Screenshot_20201113-234307.jpg

    see:
    Screenshot (78).png

    how to fix it???

    this is my code:

    Code (CSharp):
    1.  
    2. using EasyMobile;
    3. using TMPro;
    4. using UnityEngine;
    5. using UnityEngine.UI;
    6.  
    7. public class IAP : MonoBehaviour
    8. {
    9.  
    10.     public string noads;
    11.    
    12.     public GameObject shopPanel;
    13.  
    14.     public Button coinPack1;
    15.  
    16.     public Button coinPack2;
    17.     public Button NoAds_Btn;
    18.     public Button openShop;
    19.     public Button closeShop;
    20.  
    21.     float pack1 = 10000f;
    22.     float pack2 = 30000f;
    23.  
    24.  
    25.     private void Awake()
    26.     {
    27.         if (!RuntimeManager.IsInitialized())
    28.             RuntimeManager.Init();
    29.  
    30.         // Initialize the IAP module
    31.         InAppPurchasing.InitializePurchasing();
    32.         Debug.Log("IAP Runtime Inizialized");
    33.        
    34.     }
    35.  
    36.     // Start is called before the first frame update
    37.     void Start()
    38.     {
    39.         bool isInitialized = InAppPurchasing.IsInitialized();
    40.  
    41.        //remove this PlayerPrefs.SetString("cancel_save", "false");
    42.  
    43.  
    44.     }
    45.  
    46.     public void Update()
    47.     {
    48.         noads = PlayerPrefs.GetString("cancel_save");
    49.         if (noads == "true")
    50.         {
    51.             NoAds_Btn.GetComponentInParent<Image>().enabled = false;
    52.             NoAds_Btn.GetComponentInChildren<TextMeshProUGUI>().enabled = false;
    53.  
    54.         }
    55.        
    56.     }
    57.  
    58.     private void OnEnable()
    59.     {
    60.         InAppPurchasing.PurchaseCompleted += PurchasingCompleteHandle;
    61.         InAppPurchasing.PurchaseFailed += PurchasingFailedHandle;
    62.     }
    63.  
    64.     private void PurchasingFailedHandle(IAPProduct product)
    65.     {
    66.         NativeUI.Alert("Error", "The purchase of product " + product.Name + " has failed.");
    67.         Debug.Log("IAP purchase failed");
    68.     }
    69.  
    70.     private void PurchasingCompleteHandle(IAPProduct product)
    71.     {
    72.         switch (product.Name)
    73.         {
    74.             case EM_IAPConstants.Product_coin_pack_1:
    75.                 float coin1 = CoinManager.coin + pack1;
    76.                 PlayerPrefs.SetFloat("Coins", coin1);
    77.                 Debug.Log("purchased coin pack 1");
    78.                 break;
    79.             case EM_IAPConstants.Product_coin_pack_2:
    80.                 float coin2 = CoinManager.coin + pack2;
    81.                 PlayerPrefs.SetFloat("Coins", coin2);
    82.                 Debug.Log("purchased coin pack 2");
    83.                 break;
    84.             case EM_IAPConstants.Product_No_Ads:
    85.                 PlayerPrefs.SetString("cancel_save", "true");
    86.                 Debug.Log("noads value is: " + noads);
    87.                 Advertising.RemoveAds(true);
    88.                 Debug.Log("purchased noads");
    89.                 break;
    90.             //default:
    91.               //  break;
    92.         }
    93.     }
    94.  
    95.     public void PurchaseCoinPack1()
    96.     {
    97.         InAppPurchasing.Purchase(EM_IAPConstants.Product_coin_pack_1);
    98.         Debug.Log("Pressed coin pack 1");
    99.     }
    100.  
    101.     public void PurchaseCoinPack2()
    102.     {
    103.         InAppPurchasing.Purchase(EM_IAPConstants.Product_coin_pack_2);
    104.         Debug.Log("Pressed coin pack 2");
    105.     }
    106.  
    107.     public void PurchaseNoAds()
    108.     {
    109.         InAppPurchasing.Purchase(EM_IAPConstants.Product_No_Ads);
    110.         Debug.Log("Pressed noads");
    111.     }
    112.  
    113.  
    114.     public void OpenShop()
    115.     {
    116.         if (!shopPanel.activeSelf)
    117.             shopPanel.SetActive(true);
    118.         Debug.Log("IAP panel open");
    119.     }
    120.  
    121.     public void CloseShop()
    122.     {
    123.         shopPanel.SetActive(false);
    124.         Debug.Log("IAP panel close");
    125.  
    126.     }
    127. }

    please help me
     
  48. kk3hi3123

    kk3hi3123

    Joined:
    Aug 17, 2016
    Posts:
    31
    Hello, I am trying to set up Game Center for iOS user to save the game data. Everything seems ok until I find a very odd bug.

    When I delete the application and re-install, the application will login to Game Center but get empty save data. And when I restart the application, the data saved before deleting the application comes back.

    Code (CSharp):
    1. void Init()
    2.         {
    3.             GameServices.UserLoginSucceeded += () => {
    4.                 GameServices.SavedGames.OpenWithAutomaticConflictResolution(
    5.                     "My_Saved_Game",
    6.                     LoadSavedDataFromGS
    7.                 );
    8.             };
    9.             GameServices.Init();
    10.         }
    11.  
    12.         void LoadSavedDataFromGS(SavedGame save, string error)
    13.         {
    14.             if (string.IsNullOrEmpty(error))
    15.             {
    16.                 savedGame = save;        // keep a reference for later operations
    17.                 GameServices.SavedGames.ReadSavedGameData(savedGame, (SavedGame game, byte[] _data, string _error) =>
    18.                 {
    19.                     if (string.IsNullOrEmpty(_error))
    20.                     {
    21.                         if (_data.Length > 0)
    22.                         {
    23.                             BinaryFormatter bf = new BinaryFormatter();
    24.                             using (MemoryStream ms = new MemoryStream(_data))
    25.                             {
    26.                                 Debug.Log("Load data from server");
    27.                                 data = (PlayerSaveData)bf.Deserialize(ms);
    28.                             }
    29.                         }
    30.                         else
    31.                         {
    32.                             Debug.Log("The saved game has no data!");
    33.                             data = new PlayerSaveData();
    34.                         }
    35.                     }
    36.                 });
    37.             }
    38.         }
    And I have logged the data.
    1st time: DeviceName: null, ModificationDate: now
    2nd time: DeviceName: "My phone's name", ModificationDate: the saving time before deleting the application

    I am still wondering whether it is the bug from my code, Unity, Apple or Easy Mobile. Just want to see if there are some people getting the same problem.
     
  49. sivabalanppgit41

    sivabalanppgit41

    Joined:
    Aug 14, 2020
    Posts:
    1
    OneSignal push notification delivered but not showing on my android device.I don't know what to do,Please help to solve this problem

    AndroidManifest.xml

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.onesignal.onesignalsdk"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="15" />

    <permission android:name="com.g4k.EMPpush.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="com.g4k.EMPpush.permission.C2D_MESSAGE" />
    <application>
    <receiver
    android:name="com.onesignal.GcmBroadcastReceiver"
    android:permission="com.google.android.c2dm.permission.SEND" >
    <intent-filter>
    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    <category android:name="com.g4k.EMPpush" />
    </intent-filter>
    </receiver>
    </application>
    </manifest>
     
  50. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    Is there a way to check user granted permissions? So, for example, I can prompt a message if user didn't grant the storage permission.

    Just like Prime31's Etertera checkSelfPermission().