How to check if a value exists in firebase database - android

后端 未结 2 556
名媛妹妹
名媛妹妹 2020-12-18 14:18

I am new to firebase via Android(Java) and was wondering how to check if a user already exists in a database of the following format:

    gdb-2fbgg{

      u         


        
2条回答
  •  甜味超标
    2020-12-18 15:03

    Declare hander with delay as per your preference in onCreate() and call a method from here

            Handler h = new Handler();
            h.postDelayed(new Runnable() {
                @Override
                public void run() {
                    ok();
                }
            },3000);
    

    Then create this method body

    public void ok(){
        Toast.makeText(this, "Count is : "+adapter.getItemCount(), Toast.LENGTH_SHORT).show();
    }
    

    Now you will get count after specfied delay

提交回复
热议问题