Notifications
Clear all

Online status

32 Posts
3 Users
0 Reactions
4,601 Views
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

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

 
Posted : 02/10/2015 8:25 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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:

user.Load((bool success) => {
   if (success)
      Debug.Log(user.userName + " is now " + user.state);
});

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 02/10/2015 10:10 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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

 
Posted : 02/10/2015 10:17 pm
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

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!

 
Posted : 04/10/2015 1:14 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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

 
Posted : 04/10/2015 1:56 am
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

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!

 
Posted : 30/06/2016 2:32 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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

 
Posted : 07/08/2016 12:32 pm
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

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.

 
Posted : 08/08/2016 5:48 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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

 
Posted : 12/08/2016 5:57 pm
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

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.

 
Posted : 15/08/2016 8:20 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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

 
Posted : 16/08/2016 7:06 pm
(@gecko64)
Posts: 82
Estimable Member
 

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?

 
Posted : 30/09/2016 5:16 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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

 
Posted : 30/09/2016 5:51 pm
(@gecko64)
Posts: 82
Estimable Member
 

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?)

 
Posted : 23/10/2016 7:04 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

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

 
Posted : 24/10/2016 11:23 am
Page 1 / 3
Share: