Top

Android bubble invitation notification in foreground

Comments

5 comments

  • 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
    Comment actions 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
    Comment actions 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
    Comment actions Permalink
  • Sandeepp SATPUTE

    Ok, Thanks

    0
    Comment actions Permalink
  • Sandeepp SATPUTE

    The notification does receive when the app is in background

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Still can't find what you need?

  • Contact Us

    Do you have any question about Rainbow? Leave us a message to get more information.

    Contact
  • Ask the Community

    Do you need help? Ask your questions to the Community and get answers from other Rainbow users.

    Post message