Top

Android bubble invitation notification in foreground

Commentaires

5 commentaires

  • 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
    Actions pour les commentaires Permalien
  • Sandeepp SATPUTE

    Thanks.

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

    dataChanged method call twice when once invitation added
    0
    Actions pour les commentaires Permalien
  • 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
    Actions pour les commentaires Permalien
  • Sandeepp SATPUTE

    Ok, Thanks

    0
    Actions pour les commentaires Permalien
  • Sandeepp SATPUTE

    The notification does receive when the app is in background

     

    0
    Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.

Vous n'avez pas trouvé ce que vous cherchez?

  • Contactez-nous

    Vous avez des questions? Laissez-nous un message pour obtenir plus d'informations.

    Contactez-nous
  • Demandez à la Communauté

    Vous avez besoin d'aide? Posez vos questions à la Communauté et obtenez des réponses d'autres utilisateurs Rainbow.

    Poster un message