Firebase Java Admin SDK don't work

前端 未结 4 1309
暗喜
暗喜 2021-01-07 05:59

I am following the documentation on Firebase website on setting up an Java Admin SDK. So I add the dependency to the build.gradle, and added the following code:



        
4条回答
  •  半阙折子戏
    2021-01-07 06:57

    Add this code:

    ApiFuture api=/*your reference to database*/usersRef.setValueAsync(users/*the data*/);
    
    Object o = api.get(/*time out*/8,TimeUnit.SECONDS/*unite for time out her is seconds*/);
    

    And at last you can check with

    api.isDone();
    

提交回复
热议问题