[Released] Ultimate Mobile Pro

Hi, I found a little bug.
I made the game for Facebook gameroom already.
and, porting to android with UM.

I made the new sample project to test on android platform.
Import UM.
Open AN_GMS_Auth_Example.
Build apk.
Close project.
Reopen the project.
Then, It shows error for facebook API.

If you install Unity include facebook gameroom. Unity supports FB gameroom for windows.
Then, FB library in Unity is imported to Library folder of project.
I think, It maybe make UM define SA_FB_INSTALLED.
But, FB is not imported on project.
It causes compile error.

Sorry for the delay with the response. Let me answer all those questions one by one now :slight_smile:

Ther is no unified LeaderboardID, the reason is, what if you have 5 leaderboards on iOS and 3 on Android…
I just wasn’t sure you guys will need it. So currently you need to manage id’s your self.

That’s a very good point.
But when Package Manager will come for 100% there will be the ability to check if a certain module is available, and then I can strip parts of the code based on this.
Currently. You are 100% can remove all the Examples & Test.
If you want we can talk more about it, and try to strip the plugin for your project needs.

@ahching thx for posting a code example. The code is 100% fine as well as the example for documentation.
However, it will only work with the latest UMP version which is 2018.7.3, and it seems like you have exactly this one.

It makes me think that when you updated from 2018.6.2 to 2018.7.3 something went wrong during an update.
So can you just remove plugin completely (keep only your the Settings folder) and download the latest version.
Or just PM me, I would really like to look at how 2018.7.3 cannot have those classes. I will might understand what went wrong during an update. Thanks.

@numabus Have you built it on a real device? If so, what was the platform you built for?

@nemo76
Thx a lot for the report. Can you tell me more about it.
So in other words, if you include facebook gameroom. The UM then regonezes FB lib in a project and enables SA_FB_INSTALLED define. but the FB lib isn’t actually in a project. Is this the case?
If so what it facebook gameroom where can I get it from to test, and make sure it will not trigger SA_FB_INSTALLED define to be added to project settings.
Thanks!

I just run on Unity Editor.

Platform : macOS Sierra 10.12.6

I doubt may be theres some mistakes. So switch Another mac And I check again…
But There’s no different. It’s not Working.

I post unitypackage it binds test scene and script files.

3937411–336709–TestUM.unitypackage (3.36 KB)

Why does my app on Android ask me for phone-usage permissions?
I also do not see any buttons in the settings ui (they seem to be hidden since I can click on the gray header). I also do not see the summary tab.
I am using Unity 2017.3.1f1

So based on documentation
https://unionassets.com/ultimate-mobile-pro/leaderboards-731

//The identifier for the leaderboard.
var leaderboardId = "YOUR_LEADERBOARD_ID_HERE";

UM_GameService.LeaderboardsClient.SubmitScore(leaderboardId, score, context, (result) => {
    if(result.IsSucceeded) {
        Debug.Log("Score submitted successfully");
    } else {
        Debug.Log("Failed to submit score: " + result.Error.FullMessage);
    }
});

I’m very confused as to what is the “leaderboardID”?

lets say for ios in itunes connect i have ID of “iosLeaderboard”
and on android i have the resource file with ID “androidLeaderboard”

so do i have to do

//#if UNITY_ANDROID
 
UM_GameService.LeaderboardsClient.SubmitScore(androidLeaderboard, score, context, (result) => {
    if(result.IsSucceeded) {
        Debug.Log("Score submitted successfully");
    } else {
        Debug.Log("Failed to submit score: " + result.Error.FullMessage);
    }
});
        //#elif UNITY_IOS
UM_GameService.LeaderboardsClient.SubmitScore(iosLeaderboard, score, context, (result) => {
    if(result.IsSucceeded) {
        Debug.Log("Score submitted successfully");
    } else {
        Debug.Log("Failed to submit score: " + result.Error.FullMessage);
    }
});

Also what about ShowUI function, does it autodetect based on platform the app is built on?

var client = UM_GameService.LeaderboardsClient;
client.ShowUI((result) => {
    if(result.IsSucceeded) {
        Debug.Log("User closed Leaderboards native view");
    } else {
        Debug.Log("Failed to start Leaderboards native view: " + result.Error.FullMessage);
    }
});

I just want to replicate same functionality as old ultimate mobile.
I have only 1 leaderboard for ios and android.
As per old ultimate mobile settings i have 1 unified leaderboardID string that i use with the API.

UM_GameServiceManager.Instance.SubmitScore(leaderboardID, score);
UM_GameServiceManager.Instance.ShowLeaderBoardUI(leaderboardID);

I use following code to check if GameServices is connected:

if (UM_GameServiceManager.Instance.ConnectionSate == UM_ConnectionState.DISCONNECTED || UM_GameServiceManager.Instance.ConnectionSate == UM_ConnectionState.UNDEFINED)
        {
            UM_GameServiceManager.Instance.Connect();
        }

Can you give a code example for these please with new Pro version?
thanks.

After reading you additional explanations i´m still left with some questions:

  • how should i deal with store refunds? With the old UM my approach was to always silently connect to the store, get the product list and check for the isPurchased-Flag, then store the state locally in playerPrefs. I use the player prefs for the initial setup and in case the player is offline. Once i get the store-update i can lock items wich were unlocked before and got refunded.
  • So with the old UM you did the isPurchased-Flag via caching the purchases?

Do you have an ETA for this, in best cases a ETA for the Android Plugin and for the unified API integration…

Yeah… i stumbled upon the explanation by my own, reading through all the docs, but it was missing in the UM docs indeed

Yeah, well i also don´t understand it :slight_smile: Matter of fact is:

  • When i install die App, it asks for Access to Photos, Media and files… in unity-buildsettings i have set it to
  • “install prefere external” and “write-permission internal” which should not cause this permission (and never had before with the old version)
  • The app also started asking for “android.permission.CALL_PHONE” which is super weired. As fas as i know i can´t set this permission in unity and i have done nothing to set it in UMPro.

I never had those permissions beforehands and the only thing i´ve done since then is upgrade from Unity 5.6 to 2018 and swap out UM for UMPro

Also the UM Service overview looks wrong. It tells me that the Camera and the Gallery Feature is activated for iOS

In the iOS UIKit Settings everything possible is disabled

All

3940867--337057--Screenshot 2018-11-29 at 12.09.03.png

Hey @luniac so regarding the leaderboards you may do something like this:

 string Leaderboardid = string.Empty;
        switch (Application.platform) {
            case RuntimePlatform.Android:
                Leaderboardid = "iOS";
                break;
            case RuntimePlatform.IPhonePlayer:
                Leaderboardid = "Android";
                break;
        }

        UM_GameService.LeaderboardsClient.SubmitScore(Leaderboardid, score, context, (result) => {
            if (result.IsSucceeded) {
                Debug.Log("Score submitted successfully");
            } else {
                Debug.Log("Failed to submit score: " + result.Error.FullMessage);
            }
        });

I would siggets you maintain your “own” id’s factory based on platfrom or any other application setting you need.

Yes it does, nothing is required from your side :slight_smile:

About the player auth state, I just added this to the documentation, please have a look:
https://unionassets.com/ultimate-mobile-pro/authentication-729#check-auth-state

@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.

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.

Hey @The_Arrival very nice quiastion. The another push for me to finaly start making videos with a lot of exmplanations :slight_smile: 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 =) ):

3941305--337129--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 :slight_smile:

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.

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: Unity 2017 - read_phone_state permission, cant remove

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,

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

ok i think i understand. So the SubmitScore function auto detects platform as well?

@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.

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.

Hi Lacost,

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

Yea, that looked like an update issue. Keep me posted in case anything else happen :slight_smile:

The 2018.8.5 update is ready!
4055575--352828--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