Android bubble invitation notification in foreground
When the app is in foreground , is there a way to receive the invite notification.
The notification does receive when the app is in background . However not receiving it when in foreground
-
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
Por favor, entrar para comentar.
Comentários
5 comentários