Firebase BD, show user online in APP

0

I am building a radio APP with firebase and wanted to know how I can do that every time a user is listening to the radio, is added to the ones that are already listening, that is, I want to get the amount of Online Listeners at the moment, using the DB from the firebase. Ex

radioReferencia.child(nomeRadio).child("Ouvintes").addValueEventListener(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {

                }

                @Override
                public void onCancelled(DatabaseError databaseError) {

            }
        });
    
asked by anonymous 19.03.2018 / 19:39

0 answers