无法从onDataChange()内部调用publishProgress

时间:2019-11-08 12:39:12

标签: android firebase firebase-realtime-database android-asynctask

DatabaseReference myRef = database.getReference(address[0]+"/"+address[1]);
                myRef.addValueEventListener(new ValueEventListener() {
      @Override
      public void onDataChange(DataSnapshot dataSnapshot) {
             // This method is called once with the initial value and again
             // whenever data at this location is updated.
             String value = dataSnapshot.getValue(String.class);
                        publishProgress(getping(value));
       }

publishProgress总是被跳过。

0 个答案:

没有答案