Hello.
Is the Profile.state field supposed to work automatically? It seems if I check it for CombuManager.localUser after logging in, it still gives me UserState.Offline...
No, it's not automatic but for localUser after login should work as intended, if you need online state updated you can call Load on the user that you need to investigate:
if (success)
Debug.Log(user.userName + " is now " + user.state);
});
FRANCESCO CROCETTI @ SKARED CREATIONS
Anyway there's a new important update that you should download (version 2.1.2). Download it from Store > Purchase History.
FRANCESCO CROCETTI @ SKARED CREATIONS
Well, like I said, it gives Offline for the local user after logging in.
As for other users, I haven't been calling Load on individual users but I have been loading the friends list. That should include all the up-to-date (at time of loading the list) values of each player's online status, right? (It doesn't seem to.)
Thanks for pointing out the new version!
In my local installation it works and says Playing, have you tried the latest version?
What returns this after a successful Authenticate?
Debug.Log(CombuManager.localUser.state + " > " + CombuManager.localUser.lastSeen);
FRANCESCO CROCETTI @ SKARED CREATIONS
Hello again.
We've returned to look at this old issue.
In answer to your question, (immediately) after a successful Authenticate, the line you gave me prints out the following:
Offline > 06/30/2016 11:26:12
I did this test at 13:25 or so but there might be time zone differences involved. I hadn't logged in with that particular account previously today, so the timestamp must refer to this login.
Note that the online status on the admin end is also never "Online".
Thanks for any advice!
Did you set the Timezone property of CombuManager.instance (read here about Timezone in Client configuration section)? You should set the timezone value on your client getting it from the system (you could search the web to create a function to convert C# timezone to PHP string, because the supported values are those of PHP at here).
This may change in the future to be automatically set during CombuManager initialization, but for now you need to set it in your own code on client.
FRANCESCO CROCETTI @ SKARED CREATIONS
Hello and thanks for the response,
However, the time zone stuff is not something I need fixed. I only mentioned it to explain why the line of code you told me to add prints out that timestamp. What I need addressed is the fact that none of our players ever show as Online on either the player's end (Profile.state) or the server's. Hopefully the test you asked me to do (printing out the state and lastSeen right after authenticating successfully) helps you figure out what's happening here.
Unless you're saying that the mismatching time zones somehow causes this issue, which would seem very weird to me (especially given it never works on the server either).
Edit: Apparently, it all works for some players, but it's never worked in our tests.
Usually it should work (timezone setting on client may be necessary anyway because the online presence is set by checking the lastSeen property of user profiles), even if "online presence" isn't exactly easy to achieve in a connectionless environment like HTTP, I will eventually take a look at this when will come back from holidays next 2 weeks.
FRANCESCO CROCETTI @ SKARED CREATIONS
The two of us tested this by both setting the Time Zone on CombuManager to our respective PHP timezones ("Europe/Berlin" for me, and "America/Chicago" for Dave). When we tested, the online status was "Playing" after I logged in, and the lastSeen value matched my computer's clock. Dave could see me online, but then even if I quit our program I just kept lingering online (and still am).
Dave, on the other hand, had "Playing" as his status on his end (according to the debug line you gave me), but the lastSeen value matched MY clock. We made quite sure that on his side the time zone was set up at "America/Chicago", so I don't know how this could happen. I read on your documentation that setting the Time Zone property "can be used to force the webservices to use a specifc timezone". What exactly does this mean? Does it mean me setting my Time Zone to "Europe/Berlin" and logging in makes everyone use "Europe/Berlin" from that point on? In any case, I never saw David online, nor did the server (located in Chicago as well).
I'm afraid we really need your help sorting this out.
We are currently in holidays and will be back at work at August 22nd, I will try to take a look at this.
FRANCESCO CROCETTI @ SKARED CREATIONS
Skared Creations said
We are currently in holidays and will be back at work at August 22nd, I will try to take a look at this.
Would you be able to take a look at this soon?
There's currently no ETA for online status, we're still thinking about a reliable way to implement this in a connectionless environment like HTTP.
FRANCESCO CROCETTI @ SKARED CREATIONS
Does online status work now in 2.1.1? I see the note about time zones, but unclear if that addresses this issue...
(And is there more explanation of these new features, like how Guest Accounts work?)
Hopefully saving the dates as UTC in the database should help to solve the online issues, I've slightly changed the client code in Profile.state, please see if that solved the issue.
About CreateGuest and AuthenticateSession you can find examples in http://skaredcreations.com/api/combu/page_users.html
FRANCESCO CROCETTI @ SKARED CREATIONS