Skip to content

Instantly share code, notes, and snippets.

@fm-eb
fm-eb / FirebaseHeartbeatConnector.java
Created November 16, 2018 10:00
Firestore keepalive
private FirebaseDatabase firebaseDatabase;
private DatabaseReference connectedRef;
private ValueEventListener connectionStateListener;
public FirebaseHeartbeatConnector(FirebaseApp firebaseApp) {
L.i("FirebaseHeartbeatConnector() called with: firebaseApp = [" + firebaseApp + "]");
firebaseDatabase = FirebaseDatabase.getInstance(firebaseApp);
firebaseDatabase.setLogLevel(Logger.Level.DEBUG);
}
{
"iss": "<email of service-account-user>",
"aud": "google",
"typ": "savetowallet",
"iat": 1656319498,
"origins": [],
"payload": {
"genericObjects": [
{
"id": "<issuerId>.<randomUUID>",