Firebase how to stop Listener [duplicate]












-1
















This question already has an answer here:




  • How to remove listener from Firebase Realtime Database

    3 answers




Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener










share|improve this question















marked as duplicate by André Kool, Frank van Puffelen android
Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 15:09


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.























    -1
















    This question already has an answer here:




    • How to remove listener from Firebase Realtime Database

      3 answers




    Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener










    share|improve this question















    marked as duplicate by André Kool, Frank van Puffelen android
    Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

    StackExchange.ready(function() {
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function() {
    $hover.showInfoMessage('', {
    messageElement: $msg.clone().show(),
    transient: false,
    position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
    dismissable: false,
    relativeToBody: true
    });
    },
    function() {
    StackExchange.helpers.removeMessages();
    }
    );
    });
    });
    Nov 26 '18 at 15:09


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      -1












      -1








      -1









      This question already has an answer here:




      • How to remove listener from Firebase Realtime Database

        3 answers




      Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener










      share|improve this question

















      This question already has an answer here:




      • How to remove listener from Firebase Realtime Database

        3 answers




      Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener





      This question already has an answer here:




      • How to remove listener from Firebase Realtime Database

        3 answers








      android firebase firebase-realtime-database






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 26 '18 at 15:06









      JakeSteam

      2,57352642




      2,57352642










      asked Nov 26 '18 at 12:23









      Andrei GospodarencoAndrei Gospodarenco

      8919




      8919




      marked as duplicate by André Kool, Frank van Puffelen android
      Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 26 '18 at 15:09


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by André Kool, Frank van Puffelen android
      Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 26 '18 at 15:09


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


























          1 Answer
          1






          active

          oldest

          votes


















          2














          You can remove the reference's listener with removeEventListener.



          For example: ref.removeEventListener(listener);



          ref = Reference you initially set the listener on.



          listener = The listener (e.g. this if called within the listener).






          share|improve this answer
























          • im sorry but how I can understand when listener is removed?

            – Andrei Gospodarenco
            Nov 26 '18 at 18:59











          • after removing listener is working, and is removing many times because it is true value in my verification, why it can be

            – Andrei Gospodarenco
            Nov 26 '18 at 19:01




















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          You can remove the reference's listener with removeEventListener.



          For example: ref.removeEventListener(listener);



          ref = Reference you initially set the listener on.



          listener = The listener (e.g. this if called within the listener).






          share|improve this answer
























          • im sorry but how I can understand when listener is removed?

            – Andrei Gospodarenco
            Nov 26 '18 at 18:59











          • after removing listener is working, and is removing many times because it is true value in my verification, why it can be

            – Andrei Gospodarenco
            Nov 26 '18 at 19:01


















          2














          You can remove the reference's listener with removeEventListener.



          For example: ref.removeEventListener(listener);



          ref = Reference you initially set the listener on.



          listener = The listener (e.g. this if called within the listener).






          share|improve this answer
























          • im sorry but how I can understand when listener is removed?

            – Andrei Gospodarenco
            Nov 26 '18 at 18:59











          • after removing listener is working, and is removing many times because it is true value in my verification, why it can be

            – Andrei Gospodarenco
            Nov 26 '18 at 19:01
















          2












          2








          2







          You can remove the reference's listener with removeEventListener.



          For example: ref.removeEventListener(listener);



          ref = Reference you initially set the listener on.



          listener = The listener (e.g. this if called within the listener).






          share|improve this answer













          You can remove the reference's listener with removeEventListener.



          For example: ref.removeEventListener(listener);



          ref = Reference you initially set the listener on.



          listener = The listener (e.g. this if called within the listener).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 26 '18 at 14:58









          JakeSteamJakeSteam

          2,57352642




          2,57352642













          • im sorry but how I can understand when listener is removed?

            – Andrei Gospodarenco
            Nov 26 '18 at 18:59











          • after removing listener is working, and is removing many times because it is true value in my verification, why it can be

            – Andrei Gospodarenco
            Nov 26 '18 at 19:01





















          • im sorry but how I can understand when listener is removed?

            – Andrei Gospodarenco
            Nov 26 '18 at 18:59











          • after removing listener is working, and is removing many times because it is true value in my verification, why it can be

            – Andrei Gospodarenco
            Nov 26 '18 at 19:01



















          im sorry but how I can understand when listener is removed?

          – Andrei Gospodarenco
          Nov 26 '18 at 18:59





          im sorry but how I can understand when listener is removed?

          – Andrei Gospodarenco
          Nov 26 '18 at 18:59













          after removing listener is working, and is removing many times because it is true value in my verification, why it can be

          – Andrei Gospodarenco
          Nov 26 '18 at 19:01







          after removing listener is working, and is removing many times because it is true value in my verification, why it can be

          – Andrei Gospodarenco
          Nov 26 '18 at 19:01







          Popular posts from this blog

          Ottavio Pratesi

          Tricia Helfer

          15 giugno