Efficient use of Installation for Push Notification

No. my app was only usable if user is logged in. So I only saved Installation class when there is a logged in user.

Oh I see what you mean now. LiveQuery and push notification are not a replacement for each other. They have different behaviours. If you need realtime communication you should choose LiveQuery. But if you want to send the data to user no matter what, then push notification is better. In fact I made a chat app that send messages with push notification and doesnt use livequery. Its not a commercial app but ıt can give you a hint. But its Android and Java.

Edit: I want to explain my approach in this project. If you use both live query and push notifications, data consistency might be effected Users can see duplicated messages. In my app I used SQL Lite database. My UI was getting data from only this sql database. And When I get data from notification service, I was saving it to SQL database. This also provided offline support for chat.

You can do the same. Save data you get from push and live query to SQL database. And feed your list from SQl database. So your list will have only one source of data.

You can use both push notifications and livequery. Use livequery as primary and if you have connection issue, then support it with push notification.

I couldn’t make parse push work. Docs for push notification is not up to date. Its not specific to just push notification. Docs are ‘sweet spot’ of parse. And firebase docs were better. And I had better control over it. And parse uses firebase under the hood.

I’m not sure what you mean by that. But push notifications are stored 28 days at google servers. And they sent when user gets back online. If user doesn’t get online in 28 days they get deleted. You can see the source: Life of a message from FCM to the device You can set a shorter time for that. But 28 days is max.And I dont think parse modifies this value. For IOS this should be similar.
This is valid for Android. But not sure for ios. I dont have ios development experience.

I dont think so. Back4App wants you to enter GCM Sender ID. Which you can get it from Firebase (Which is same with Parse Server). Maybe @davimacedo can enlighten us.

I was talking about Android. I dont have information for IOS. Sorry.

1 Like