diff --git a/examples/RTDB/DataChangesListener/Callback/Callback.ino b/examples/RTDB/DataChangesListener/Callback/Callback.ino index d3f03dfaf..f56580dca 100644 --- a/examples/RTDB/DataChangesListener/Callback/Callback.ino +++ b/examples/RTDB/DataChangesListener/Callback/Callback.ino @@ -226,3 +226,12 @@ void loop() // Server was disconnected! } } + +// To pause stream +// stream.pauseFirebase(true); +// stream.clear(); // close session and release memory + + +// To resume stream with callback +// stream.pauseFirebase(false); +// Firebase.RTDB.setStreamCallback(&stream, streamCallback, streamTimeoutCallback); diff --git a/examples/RTDB/DataChangesListener/MultiPath/MultiPath.ino b/examples/RTDB/DataChangesListener/MultiPath/MultiPath.ino index d0e5319bf..562a0117b 100644 --- a/examples/RTDB/DataChangesListener/MultiPath/MultiPath.ino +++ b/examples/RTDB/DataChangesListener/MultiPath/MultiPath.ino @@ -251,3 +251,13 @@ void loop() // Server was disconnected! } } + + +// To pause stream +// stream.pauseFirebase(true); +// stream.clear(); // close session and release memory + + +// To resume stream with callback +// stream.pauseFirebase(false); +// Firebase.RTDB.setMultiPathStreamCallback(&stream, streamCallback, streamTimeoutCallback); \ No newline at end of file