4 ms·
So the downsides are: Your app needs to maintain an active connection, which impacts battery life. The app must be in the foreground or use background tasks. Y
by andrewfromx 2y ago
So the downsides are:
Your app needs to maintain an active connection, which impacts battery life. The app must be in the foreground or use background tasks. You won't get the system-level benefits of APNS (like waking up a terminated app)
- kbrandon 2y agoYou raise good points about the tradeoffs! Pushlytic is designed for different use cases than APNS - it's for real-time data streaming when your app is active. For background notifications, APNS/FCM are absolutely the right tools. I'd recommend using both: APNS for background notifications to bring users back to your app, and Pushlytic for real-time data streaming while they're actively using it. The battery impact is minimized since the SDK use gRPC, but you're right that any persistent connection will have some battery cost. That's why the library tries to handle connection management carefully - the connection will close when the app is backgrounded and reopen upon foregrounding. You can also close the stream at any point.