Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Heroku{
- public List<Post> unpublished;
- public List<Post> getUnpublished(){
- Firebase fbase = new Firebase (FBASE_URL);
- ref.addChildEventListener(new ChildEventListener() {
- // Retrieve new posts as they are added to Firebase
- @Override
- public void onChildAdded(DataSnapshot snapshot, String previousChildKey) {
- Map<String, Object> newPost = (Map<String, Object>) snapshot.getValue();
- // push to unpublished like newpost.get...
- }
- }
- retun unpublished;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement