ios and android backend and reopen app

106 views
Skip to first unread message

zhiyang hu

unread,
Oct 25, 2021, 11:20:44 PM10/25/21
to Tinode General
I have a question. when I kill the device. then I reopen the app. the sub me topic will send ims or not.

Gene

unread,
Oct 26, 2021, 12:47:44 PM10/26/21
to Tinode General
ims is stored in the device. If device is reset, ims is usually lost with all the other app data. 
Android maybe configured to back up the app data. In such a case the contents of SQLite are preserved and ims is preserved too.

zhiyang hu

unread,
Oct 26, 2021, 9:37:16 PM10/26/21
to Tinode General
so how can I set the app when I reopen app to receive messages. how to  configure app

Gene

unread,
Oct 26, 2021, 10:26:50 PM10/26/21
to Tinode General
If you reopen the app then the ims is going to be used (if available).
If you reinstall the app then the ims is NOT going to be used.

zhiyang hu

unread,
Oct 26, 2021, 10:47:35 PM10/26/21
to Tinode General
but when I reopened the app. the app can't receive unread count. if I reinstall the app, I can receive.
If I use webapp. It can receive because sub me won't send ims

Gene

unread,
Oct 27, 2021, 1:04:01 AM10/27/21
to Tinode General
On Tuesday, October 26, 2021 at 7:47:35 PM UTC-7 zhiyang hu wrote:
but when I reopened the app. the app can't receive unread count. if I reinstall the app, I can receive.
If I use webapp. It can receive because sub me won't send ims

I do not understand what you are trying to achieve. I don't understand what in your opinion is not working.
I use the chat daily and it works as expected.

zhiyang hu

unread,
Oct 27, 2021, 3:39:23 AM10/27/21
to Tinode General
first I use huzhiya account login in android app. It show this
 20211027-153142.png

then I kill the app and I use Bob account send four messages.
20211027-153412.png
then I use web login huzhiya accout unread is right
20211027-153529.png
but I reopen the android app. It's unread not right
20211027-153652.png
because web will not send ims。It‘s sub me get all topic.
But app will send ims. I read serve code. It's order by updatedat. send message won't update sub's updatedat. so It's be filtered

Gene

unread,
Oct 28, 2021, 1:10:27 PM10/28/21
to Tinode General
Thank you, now I understand. Will fix in the next release.
You probably have your push notifications turned off.

zhiyang hu

unread,
Oct 28, 2021, 10:16:32 PM10/28/21
to Tinode General
How do you fix this bug? in server or in app

Gene

unread,
Oct 28, 2021, 10:30:40 PM10/28/21
to Tinode General
On Thursday, October 28, 2021 at 7:16:32 PM UTC-7 zhiyang hu wrote:
How do you fix this bug? in server or in app

In the server. I need to change the SELECT in the database from constraining on updatedAt>=ims to touchedAt>=ims (and also add/change appropriate indexes), and I need to update touchedAt whenever updatedAt is changed (but not the other way around).

zhiyang hu

unread,
Oct 29, 2021, 2:02:14 AM10/29/21
to Tinode General
ok, thanks

Gene

unread,
Nov 6, 2021, 9:51:24 PM11/6/21
to Tinode General
Reply all
Reply to author
Forward
0 new messages