Top

Android bubble invitation notification in foreground

Comentarios

5 comentarios

  • Jonathan PETIT

    Hi Sandeep,

     

    Sorry for the delay of the response.

     

    In foreground, to know when you have an invitation to join a new bubble, you should do:

     

    RainbowSdk.instance.bubbles.getAllBubbles.registerChangeListener(changeListener);

     

    private IItemListChangeListener roomChangeListener = new IItemListChangeListener()
    {
    @Override
    public void dataChanged()
    {
    Thread myThread = new Thread()
    {
    public void run()
    {
    for (Room room : m_roomMgr.getAllRooms().getCopyOfDataList())
    {
    if (room.isUserInvited())
    {
    addOrUpdateNotification(room);
    }

    }


    }
    };
    myThread.start();
    }
    };

     

    Explanation : when a new room is added, the change listener is triggered. Then, you loop on the room list (bubbles list) and if you find a room in invited state, you could put a notification in your app.

    Is it ok for you?

     

    Thanks 

     

    Regards

     

    Jonathan

    0
    Acciones de comentarios Permalink
  • Sandeepp SATPUTE

    Thanks.

    I tried this but a single invitation generates the two-time notification.

    dataChanged method call twice when once invitation added
    0
    Acciones de comentarios Permalink
  • Jonathan PETIT

    Yes, I try with rainbow app and it 's the same behaviour .

     

    We 'll try to fix it for the next version.

     

    Regards

     

    Jonathan

    0
    Acciones de comentarios Permalink
  • Sandeepp SATPUTE

    Ok, Thanks

    0
    Acciones de comentarios Permalink
  • Sandeepp SATPUTE

    The notification does receive when the app is in background

     

    0
    Acciones de comentarios Permalink

Iniciar sesión para dejar un comentario.

  • Pregunte a la Comunidad

    ¿Necesitas ayuda? Haz tus preguntas en la Comunidad para obtener respuestas de otros usuarios de Rainbow.

    Enviar un mensaje.