What does com.firebase.client.ServerValue.TIMESTAMP respong with?

后端 未结 1 1708
难免孤独
难免孤独 2021-01-16 13:43

I\'m trying to build off a chat application using Firebase on the web, and create and Android client. In my web app, I send the Firebase Server\'s time stamp along with the

相关标签:
1条回答
  • 2021-01-16 14:20

    It is too long to go into comment. I meant more something like this, which I used on number of occasions.

    var chatUserRef = new Firebase("your url to chat user");
    chatUserRef.child('time')
      .set(Firebase.ServerValue.TIMESTAMP)
      .on('value', function(snapshot){
         var current_server_time = snapshot.val();
      });
    

    It is in javascript nevertheless the principle should be the same in Java.

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题