Strange behaviour of Firebase RecyclerView

Here is code for when the Firebase RecyclerView is set, here RecyclerView is used to show a different type of post like events, discussion, requirement, etc. for events a different linear-layout is shown to the user. but this event is displayed in the posts which do not have that data. This same error is seen in the images too. the posts which don’t have image also shows images from other posts.

    recyclerView.setHasFixedSize(true);
    recyclerView.setLayoutManager(layoutManager);
    Calendar calendar = Calendar.getInstance();
    calendar.add(Calendar.DATE, -30);

    adapter = new FirebaseRecyclerAdapter<Post, PostAdapterViewHolder>(Post.class, R.layout.post_list_item, PostAdapterViewHolder.class, databaseReference.orderByChild("timestamp").startAt(calendar.getTimeInMillis()).endAt(System.currentTimeMillis())) {
        public void populateViewHolder(final PostAdapterViewHolder postAdapterViewHolder, final Post post, final int position) {
            final String key = this.getRef(position).getKey();
            Log.d("whatiskey",""+key);

            documentref.child(key).addListenerForSingleValueEvent(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {
                    String value=String.valueOf(dataSnapshot.child("documentUrl").getValue());


                   if(value.equals(null)||value.equals("null"))
                   {
                       postAdapterViewHolder.removedocumentimage();
                   }
                   else
                   {
                       getFileName(value);
                       postAdapterViewHolder.setDocumentimage();
                   }
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {

                }
            });

            postAdapterViewHolder.setKey(key);
            postAdapterViewHolder.setContext(getActivity().getApplicationContext());
            postAdapterViewHolder.setCommunityId(CommunityId);
            postAdapterViewHolder.setDescription(post.getText(),post.getType());
            postAdapterViewHolder.setUser(post.getCreator());
            postAdapterViewHolder.setTime(post.getTimestamp());
            postAdapterViewHolder.setImage(post.getImageUrl(),post.getType());
            postAdapterViewHolder.setType(post.getType());
            postAdapterViewHolder.postdata(key,CommunityId);
            postAdapterViewHolder.setLike(post.getLikesCount());
            postAdapterViewHolder.setBookmark();
            postAdapterViewHolder.time.setVisibility(View.INVISIBLE);
            postAdapterViewHolder.activitybar.setVisibility(View.GONE);
            postAdapterViewHolder.setReadMark();
        }
    };
    recyclerView.setAdapter(adapter);

here is the recyclerview’s layout for every views:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/swiplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:background="@drawable/recycler_bg"
android:orientation="horizontal"
app:cardElevation="2dp">

<TextView
    android:id="@+id/title"
    android:layout_width="7dp"
    android:layout_height="match_parent"
    android:background="@drawable/blueside" />

<LinearLayout
    android:background="?android:attr/selectableItemBackground"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <RelativeLayout
        android:id="@+id/head"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/imageView2"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_centerVertical="true"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="15dp"
            android:scaleType="fitXY"
            android:src="@drawable/user" />

        <LinearLayout
            android:id="@+id/linearLayout2"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="10dp"
            android:layout_toEndOf="@+id/imageView2"
            android:layout_toRightOf="@+id/imageView2"
            android:orientation="vertical">

            <TextView
                android:id="@+id/username"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginTop="5dp"
                android:gravity="start"
                android:text="User Name"
                android:textColor="#485866"
                android:textSize="14sp"
              />

            <TextView
                android:id="@+id/designation"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:text="Role"
                android:textSize="12sp" />

        </LinearLayout>

        <LinearLayout
            android:layout_marginTop="10dp"
            android:id="@+id/linearLayout3"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignBottom="@+id/linearLayout2"
            android:layout_marginEnd="11dp"
            android:layout_marginRight="11dp"
            android:layout_toLeftOf="@+id/bookmark"
            android:layout_toStartOf="@+id/bookmark"
            android:gravity="end"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tag"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="11dp"
                android:layout_marginRight="11dp"
                android:background="@drawable/bluebutton"
                android:gravity="center"
                android:layout_gravity="center_vertical"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:text="Post type"
                android:textColor="@color/white"
                android:textSize="6pt" />

            <TextView
                android:id="@+id/date"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginEnd="15dp"
                android:layout_marginRight="15dp"
                android:gravity="end"
                android:text="Time"
                android:textSize="5pt"
                android:visibility="invisible" />
        </LinearLayout>
        <ImageView
            android:id="@+id/bookmark"
            android:layout_width="25dp"
            android:layout_height="40dp"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:layout_gravity="center"
            android:layout_marginEnd="14dp"
            android:layout_marginRight="14dp"
            android:layout_marginTop="3dp"
            android:layout_weight="1"
            android:src="@drawable/fav_clicked_change" />

    </RelativeLayout>
    <LinearLayout
        android:id="@+id/documenttext"
        android:layout_width="match_parent"
        android:paddingRight="10dp"
        android:layout_height="30dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:background="@drawable/grayrect"
        android:orientation="horizontal"
        android:layout_gravity="center"
        android:gravity="center">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="0.3"
            app:srcCompat="@drawable/darkattachment"
            android:padding="5dp"/>
        <TextView
            android:id="@+id/docname"
            android:layout_weight="0.5"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
                android:gravity="center_vertical"
            android:text="Document Attached"/>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:orientation="horizontal">

        <TextView
            android:id="@+id/description"
            android:layout_width="0dp"
            android:autoLink="web|email|phone"
            android:layout_height="wrap_content"
            android:layout_marginBottom="5dp"
            android:layout_marginEnd="5dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="5dp"
            android:layout_marginStart="15dp"
            android:layout_marginTop="5dp"
            android:layout_weight="3.8"
            android:gravity="start"
            android:maxLines="10"
            android:textColor="@color/grey"
            android:textSize="6pt" />

        <ImageView
            android:id="@+id/imageview"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_gravity="center"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:scaleType="fitCenter"
            app:srcCompat="@drawable/ic_launcher_background"
            android:transitionName="simple_activity_transition"
            android:visibility="gone"
            tools:ignore="UnusedAttribute" />

    </LinearLayout>

    <LinearLayout
        android:background="@drawable/graybutton"
        android:id="@+id/eventLayout"
        android:layout_marginLeft="15dp"
        android:layout_marginRight="10dp"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:orientation="vertical"
            android:layout_marginTop="3dp"
            android:layout_marginBottom="3dp"
            android:gravity="center"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:layout_marginRight="5dp"
                android:visibility="gone"
                android:id="@+id/event_image"
                android:layout_gravity="center"
                android:layout_width="150dp"
                android:layout_height="100dp" />

            <TextView
                android:textColor="@color/grey"
                android:layout_marginTop="3dp"
                android:gravity="center"
                android:layout_marginRight="5dp"
                android:id="@+id/post_eventName"
                android:textSize="17sp"
                android:textStyle="bold"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Name"/>

            <LinearLayout
                android:padding="3dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:gravity="center"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <ImageView
                    android:layout_width="25dp"
                    android:layout_height="20dp"
                    app:srcCompat="@drawable/locationpin"/>

                <TextView
                    android:paddingLeft="10dp"
                    android:layout_gravity="center"
                    android:id="@+id/post_eventVenue"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Venue"/>

            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_marginBottom="5dp"
            android:weightSum="2"
            android:layout_marginLeft="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:text="Event timings"
                android:layout_width="wrap_content"
                android:layout_marginRight="5dp"
                android:layout_height="wrap_content"
                android:id="@+id/post_event_timings" />

        </LinearLayout>

        <TextView
            android:id="@+id/event_description"
            android:layout_width="match_parent"
            android:autoLink="web|email|phone"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:layout_marginEnd="5dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="5dp"
            android:layout_marginStart="15dp"
            android:layout_marginTop="5dp"
            android:layout_weight="3.8"
            android:gravity="start"
            android:text="This is some random text"
            android:maxLines="10"
            android:textColor="@color/grey"
            android:textSize="6pt" />

        <LinearLayout
            android:id="@+id/post_feedback_box"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="10dp"
            android:weightSum="3"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:background="@drawable/bluecurve"
                android:id="@+id/post_eventNo"
                android:textColor="@color/white"
                android:layout_weight="1"
                android:text="No"
                android:gravity="center"
                android:layout_width="wrap_content"
                android:layout_height="30dp" />

            <TextView
                android:layout_marginLeft="5dp"
                android:background="@drawable/bluecurve"
                android:id="@+id/post_eventMaybe"
                android:textColor="@color/white"
                android:layout_weight="1"
                android:text="Maybe"
                android:gravity="center"
                android:layout_width="wrap_content"
                android:layout_height="30dp" />

            <TextView
                android:layout_marginLeft="5dp"
                android:layout_width="wrap_content"
                android:background="@drawable/bluecurve"
                android:id="@+id/post_eventYes"
                android:textColor="@color/white"
                android:text="Yes"
                android:layout_weight="1"
                android:gravity="center"
                android:layout_height="30dp" />

        </LinearLayout>

    </LinearLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <ImageView
            android:layout_marginTop="2dp"
            android:layout_marginBottom="3dp"
            android:layout_alignParentEnd="true"
            android:id="@+id/readMark"
            android:layout_marginRight="14dp"
            android:layout_width="9dp"
            android:layout_height="9dp"
            app:srcCompat="@drawable/orangecircle"
            android:layout_alignParentRight="true" />

    </RelativeLayout>

    <LinearLayout
        android:id="@+id/activitybar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:weightSum="3">


        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center">

            <ImageView
                android:id="@+id/like"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:src="@drawable/emptyup" />

            <TextView
                android:id="@+id/likecount"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:gravity="center"
                android:text="0"
                android:textSize="8pt" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dp"
            android:layout_weight="1"
            android:gravity="center">

            <ImageView
                android:layout_width="25dp"
                android:layout_height="19dp"
                android:src="@drawable/chat" />

            <TextView
                android:layout_width="30dp"
                android:layout_height="30dp"

                android:gravity="center"
                android:text="0"
                android:textSize="8pt" />

        </LinearLayout>


        <ImageView
            android:id="@+id/sharebutton"
            android:layout_width="20dp"
            android:layout_height="18dp"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:src="@drawable/share" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="10dp"
        android:orientation="horizontal">

        <TextView
            android:id="@+id/userdata"
            android:layout_width="2dp"
            android:layout_height="10dp"
            android:gravity="center"
            android:textColor="@color/white" />

        <TextView
            android:id="@+id/postdata"
            android:layout_width="match_parent"
            android:layout_height="10dp"
            android:gravity="center"
            android:textColor="@color/white"
            android:textSize="5pt" />

    </LinearLayout>

</LinearLayout>

and Inside PopulateviewGolder of the recyclerview I do this for events:

 if (type.contentEquals("Requirement")) {

        tag.setText("Requirement");
        title.setBackgroundResource(R.drawable.yellowside);
        tag.setBackgroundResource(R.drawable.yellowbutton);

    } else if (type.contentEquals("Offerings")) {

        tag.setText("Offering");
        title.setBackgroundResource(R.drawable.greenside);
        tag.setBackgroundResource(R.drawable.greenbutton);

    } else if (type.contentEquals("Question")) {

        tag.setText("Question");
        title.setBackgroundResource(R.drawable.blueside);
        tag.setBackgroundResource(R.drawable.bluebutton);

    } else if (type.contentEquals("Announcement")) {

        tag.setText("Announcement");
        title.setBackgroundResource(R.drawable.redside);
        tag.setBackgroundResource(R.drawable.redbutton);

    } else if (type.contentEquals("JLT")) {

        tag.setText("JLT");
        title.setBackgroundResource(R.drawable.blueside);
        tag.setBackgroundResource(R.drawable.bluebutton);

    } else if (type.contentEquals("Event")) {

        tag.setText("Event");
        eventLayout.setVisibility(View.VISIBLE);
        setEvent(key);
        title.setBackgroundResource(R.drawable.redside);
        tag.setBackgroundResource(R.drawable.redbutton);

    } else {

        tag.setText("Discussion");
        title.setBackgroundResource(R.drawable.blueside);
        tag.setBackgroundResource(R.drawable.bluebutton);

    }

the function of setting event data is:

eventName = itemView.findViewById(R.id.post_eventName);
    eventVenue = itemView.findViewById(R.id.post_eventVenue);
    eventTimings = itemView.findViewById(R.id.post_event_timings);

    DatabaseReference eventDBrefence = FirebaseDatabase.getInstance().getReference().child("Posts").child(CommunityId).child("posts").child(key).child("eventDetails");
    eventDBrefence.addListenerForSingleValueEvent(new ValueEventListener() {
        @Override
        public void onDataChange(DataSnapshot dataSnapshot) {
            Event event = dataSnapshot.getValue(Event.class);
            eventName.setText(event.getEventName());
            if (event.getFromDate().equals(event.getToDate())) {
                eventTimings.setText("At " + event.getFromDate() + " from " + event.getFromTime() + " to " + event.getToTime());
            } else {
                eventTimings.setText("From " + event.getFromDate() + " at " + event.getFromTime() + " to " + event.getToDate() + " at " + event.getToTime());
            }
            eventVenue.setText(event.getEventVenue());
        }

        @Override
        public void onCancelled(DatabaseError databaseError) {

        }
    });

Gradle conflict between gms.google.services and com.google.firebase:firebase-storage:11.8.0

I am using firestore db with no problems until I added:

compile 'com.google.firebase:firebase-  
     storage:11.8.0'

Now I get the message:
Error:Execution failed for task':app:processDebugGoogleServices'.

Please fix the version conflict either by
updating the version of the google-services
plugin (information about the latest version is
available at
https://bintray.com/android/android-
tools/com.google.gms.google-services/) or
updating the version of com.google.android.gms
to 11.6.0.
I have tried every combination of versions in my
gradle file with no success.
When I comment out ..storage ll.8.0 the app
gradle builds.

Below is my app gradle file:

apply plugin: 'com.android.application'
 buildscript {
 repositories {
    jcenter()
    google()
}
dependencies {
    classpath ' 
com.neenbedankt.gradle.plugins:android-apt:1.8'
    classpath 'com.google.gms:google-
services:3.2.0'
}
}
android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.XXXXXX.XXXX"
    minSdkVersion 16
    targetSdkVersion 26
    versionName "2.0"
    multiDexEnabled true //Add this
    testInstrumentationRunner 

"android.support.test.runner.
AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles 
getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
    repositories {
        flatDir { dirs "libs" }
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
 }
def BUTTER_KNIFE_VERSION = "8.5.1" //current 
version of butterknife
dependencies {
implementation fileTree(include: ['*.jar'], 
dir: 'libs')
implementation 'com.android.support:appcompat-
v7:26.1'
implementation 
'com.android.support.constraint:constraint-
layout:1.0.2'
implementation(name: "UGrokItApi-release", ext: 
"aar")
// support
implementation supportDependencies.appCompat
implementation supportDependencies.support
implementation supportDependencies.design
implementation supportDependencies.recyclerView
implementation supportDependencies.cardView

implementation 'com.google.firebase:firebase-
database:11.6.0'
implementation 'com.google.firebase:firebase-
auth:11.6.0'
compile 'com.firebaseui:firebase-ui-auth:3.1.0'   

compile 'com.google.android.gms:play-services-
auth:11.6.0'
compile 'com.google.firebase:firebase-
storage:11.8.0'
compile 'com.android.support:design:26.1.0'
compile 'com.jakewharton:butterknife:8.8.1'
 annotationProcessor 
'com.jakewharton:butterknife-compiler:8.8.1'
libraries.firebaseUIDatabase
'com.google.firebase:firebase-database:11.6.0'
implementation 'com.firebaseui:firebase-ui-
firestore:3.1.0'
implementation 
'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 
'com.android.support.test:runner:1.0.1'
androidTestImplementation 
'com.android.support.test.espresso:espresso-
core:3.0.1'
compile 'com.google.firebase:firebase-
firestore:11.6.0'
compile 'com.firebaseui:firebase-ui-
firestore:3.1.0'
compile 'com.android.support:recyclerview-
v7:26.1.0'
compile 'com.android.support:cardview-
v7:26.1.0'
compile 'com.android.support:support-
annotations:27.0.1'
compile 'com.google.android.gms:play-services-
location:11.6.0'
}
apply plugin: 'com.google.gms.google-services'

How to pass value from firebase database ValueEventListener? [duplicate]

This question already has an answer here:

im quiet new in firebase database and android, I am create a method to count total size of db children, but it always return 0 when accessed outside onDataChange method, here my code

private int getChildSize() {
 final List<String> keys = new ArrayList<>();
 DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child("profiles");
    ref.orderByChild("phoneNumber")
            .equalTo(phoneNumber)
            .addListenerForSingleValueEvent(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {
                    for(DataSnapshot item : dataSnapshot.getChildren()){
                        keys.add(item.getKey());

                        Log.d(TAG, "onDataChange: " + keys.size()); // more than 0
                    }
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {

                }
            });

 return keys.size(); // return 0;
}

any ideas?

How to list subcollections in a Cloud Firestore document

Say I have this minimal database stored in Cloud Firestore. How could I retrieve the names of subCollection1 and subCollection2?

rootCollection {
    aDocument: {
        someField: { value: 1 },
        anotherField: { value: 2 }
        subCollection1: ...,
        subCollection2: ...,
    }
}

I would expect to be able to just read the ids off of aDocument, but only the fields show up when I get() the document.

rootRef.doc('aDocument').get()
  .then(doc =>

    // only logs [ "someField", "anotherField" ], no collections
    console.log( Object.keys(doc.data()) )
  )

FireBase Crash RejectedException [on hold]

I am getting this exception, I am using firebase. Please help me solve the issue.

Fatal Exception: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@f86b95 rejected from com.google.android.gms.internal.zzdza@86092d6[Shutting down, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 3020]

NB :- I got the stack trace from Crashlytics, so dont know which is the relevant code.

Full stack trace :-

#0. Crashed: TubeSockReader-1
           at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2014)
           at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
           at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:302)
           at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:527)
           at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:616)
           at bja.a(:com.google.android.gms.DynamiteModulesC@11975446:77)
           at biv.run(:com.google.android.gms.DynamiteModulesC@11975446:72)
           at java.lang.Thread.run(Thread.java:818)

    --

    Fatal Exception: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@a136b00 rejected from com.google.android.gms.internal.zzdza@6debf39[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 3316]
           at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2014)
           at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
           at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:302)
           at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:527)
           at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:616)
           at bja.a(:com.google.android.gms.DynamiteModulesC@11975446:77)
           at biv.run(:com.google.android.gms.DynamiteModulesC@11975446:72)
           at java.lang.Thread.run(Thread.java:818)

    #0. Crashed: TubeSockReader-1
           at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2014)
           at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
           at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:302)
           at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:527)
           at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:616)
           at bja.a(:com.google.android.gms.DynamiteModulesC@11975446:77)
           at biv.run(:com.google.android.gms.DynamiteModulesC@11975446:72)
           at java.lang.Thread.run(Thread.java:818)

    #1. Queue
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation(DependencyPriorityBlockingQueue.java:197)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get(DependencyPriorityBlockingQueue.java:236)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:65)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:46)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #2. AsyncTask #3
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #3. Queue
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation(DependencyPriorityBlockingQueue.java:197)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get(DependencyPriorityBlockingQueue.java:236)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:65)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:46)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #4. AsyncTask #4
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #5. Answers Events Handler1
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2053)
           at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1090)
           at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1071)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
           at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
           at java.lang.Thread.run(Thread.java:818)

    #6. pool-10-thread-1
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #7. com.mixpanel.android.viewcrawler.ViewCrawler
           at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
           at android.os.MessageQueue.next(MessageQueue.java:328)
           at android.os.Looper.loop(Looper.java:164)
           at android.os.HandlerThread.run(HandlerThread.java:61)

    #8. Crashlytics Exception Handler1
           at dalvik.system.VMStack.getThreadStackTrace(VMStack.java)
           at java.lang.Thread.getStackTrace(Thread.java:580)
           at java.lang.Thread.getAllStackTraces(Thread.java:522)
           at com.crashlytics.android.core.CrashlyticsController.writeSessionEvent(CrashlyticsController.java:1114)
           at com.crashlytics.android.core.CrashlyticsController.writeFatal(CrashlyticsController.java:852)
           at com.crashlytics.android.core.CrashlyticsController.access$400(CrashlyticsController.java:59)
           at com.crashlytics.android.core.CrashlyticsController$6.call(CrashlyticsController.java:292)
           at com.crashlytics.android.core.CrashlyticsController$6.call(CrashlyticsController.java:285)
           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
           at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
           at java.lang.Thread.run(Thread.java:818)

    #9. AsyncTask #1
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #10. pool-1-thread-4
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2053)
           at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:435)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1037)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #11. GoogleApiHandler
           at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
           at android.os.MessageQueue.next(MessageQueue.java:328)
           at android.os.Looper.loop(Looper.java:164)
           at android.os.HandlerThread.run(HandlerThread.java:61)

    #12. Measurement Worker
           at java.lang.Object.wait(Object.java)
           at java.lang.Object.wait(Object.java:423)
           at com.google.android.gms.internal.zzcct.run(Unknown Source)

    #13. AsyncTask #2
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #14. Okio Watchdog
           at java.lang.Object.wait(Object.java)
           at com.android.okhttp.okio.AsyncTimeout.awaitTimeout(AsyncTimeout.java:311)
           at com.android.okhttp.okio.AsyncTimeout.-wrap0(AsyncTimeout.java)
           at com.android.okhttp.okio.AsyncTimeout$Watchdog.run(AsyncTimeout.java:286)

    #15. OkHttp ConnectionPool
           at java.lang.Object.wait(Object.java)
           at com.android.okhttp.ConnectionPool.performCleanup(ConnectionPool.java:305)
           at com.android.okhttp.ConnectionPool.runCleanupUntilPoolIsEmpty(ConnectionPool.java:242)
           at com.android.okhttp.ConnectionPool.-wrap0(ConnectionPool.java)
           at com.android.okhttp.ConnectionPool$1.run(ConnectionPool.java:97)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #16. TubeSockReader-1
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:421)
           at java.util.concurrent.FutureTask.get(FutureTask.java:163)
           at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:43)
           at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:285)
           at com.crashlytics.android.core.CrashlyticsController$5.onUncaughtException(CrashlyticsController.java:269)
           at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:30)
           at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
           at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)

    #17. com.mixpanel.android.AnalyticsWorker
           at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
           at android.os.MessageQueue.next(MessageQueue.java:328)
           at android.os.Looper.loop(Looper.java:164)
           at android.os.HandlerThread.run(HandlerThread.java:61)

    #18. Queue
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation(DependencyPriorityBlockingQueue.java:197)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get(DependencyPriorityBlockingQueue.java:236)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:65)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:46)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #19. Queue
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation(DependencyPriorityBlockingQueue.java:197)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get(DependencyPriorityBlockingQueue.java:236)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:65)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:46)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #20. pool-8-thread-1
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

    #21. Queue
           at java.lang.Object.wait(Object.java)
           at java.lang.Thread.parkFor$(Thread.java:1220)
           at sun.misc.Unsafe.park(Unsafe.java:299)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
           at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation(DependencyPriorityBlockingQueue.java:197)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get(DependencyPriorityBlockingQueue.java:236)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:65)
           at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:46)
           at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1038)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
           at java.lang.Thread.run(Thread.java:818)

How to send Push Notification using OneSignal in Android Studio

I’ve followed the guide in OneSignal’s documetation, i’ve setup the sdk and everything, yet, sending a notificaion through code seems to not work at all, not by a specific tag and not by “All Users” segment example which OneSignal provided in their documentation.
Tho, through their dashboard- it works perfectly.
I’ve doubled checked all the grandle setup part and stil…
Any idea why that can be happening? what should I check next?

(I didn’t attach my code here cause it’s an exact copy of OneSignal’s code in their documentation)

Thank 🙂

EDIT: i’ve noticed that when I send push notification through code- it isn’t being shown in the OneSignal’s dashboard. So it means something is wrong with the code, tho again, it is similar the the one inside thier documentation (except that i’ve changed there the ONESIGNAL APP ID
and REST API KEY, as they requested).
Any ideas? tnx.

Automate Google Firebase Analytics Data Export

After a solid load of searching I’m still not able to find a way to automate the export of Google Firebase Analytics data.

I need to import a few KPIs in an existing Google Sheet every month.

Isn’t there any option to query the Firebase API through the Google Sheet and GET the KPI I need into a cell somehow every month?

There are ways (and even plugins) to do that for Google Analytics data. So I was sure it should be possible for firebase aswell.

Pulling Marker Data From db Updating Multiple Marker Position

I am pulling marker data from database puting it into HashMap then placing them on map. The problem is how do I update positions of markers when their positions change ? Below code is adding new marker when position changes as expected.How do i know that marker is already existing so I need to update its position or remove then add again to new position ?

mydb.child("map").child("players").addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(DataSnapshot dataSnapshot) {
            HashMap<String,AvatarObject> players= new HashMap();
            for (DataSnapshot childSnapshot: dataSnapshot.getChildren()) {
                players.put(childSnapshot.getKey(), childSnapshot.getValue(AvatarObject.class));
            }
            players.remove(username); //nevermind this
            for (Map.Entry<String, AvatarObject> entry : players.entrySet()) {
                Log.d("asd","Key = " + entry.getKey() + ", Latitude = " + entry.getValue().getLatitude()+"Longitude = " + entry.getValue().getLongitude());

                 googleMap.addMarker(new MarkerOptions().position(
                        new LatLng(entry.getValue().getLatitude(),entry.getValue().getLatitude()))
                        .title(entry.getValue().getAvatar()));
            }
        }

        @Override
        public void onCancelled(DatabaseError databaseError) {}
    });

There are 2 markers in db.This is log output:

Key = yunus, Latitude = 51.890214Longitude = 29.377358
Key = lastpeony, Latitude = 50.8901758Longitude = 28.377297

how to use firebasedatabase transactions?

I want to use firebase database transaction in my react native app. I want to update the users count whenever the user is added in database

here is the code I’m using

let dbCountPath = "/DatabaseUsersCount/" + "count"

    dbCountPath.transaction(function (current_value) {
      return (current_value || 0) + 1;
    });

I’m getting error of transaction is not exists ? how can we solve this issue ?

FCM for PWA: Firebase data message also show notification when app in background in chrome

FCM for PWA

Firebase setBackgroundMessageHandler :-

 messaging.setBackgroundMessageHandler(function(payload) {
  return null;
});

payload:

{"data":{"body":"this is body","title":"notification title"}, "to":"sdsd7987:df789d....."}

setBackgroundMessageHandler function called but default notification shows in chrome but it working in firefox.

serviceWorkerRegistration.pushManager.subscribe({userVisibleOnly:false}) 

gives an error in chrome.