Push Notifications: An Energy-efficient Way to Receive Incoming Calls on Your Mobile App
- 30 Jul 2019
If you have made or received a phone call on a mobile app, you have used Voice over Internet Protocol (VoIP). Whatsapp is one. There are many others, connecting customers for consultation, conference, support and more.
An iOS or Android application enabled with VoIP helps you make and receive phone calls using mobile data instead of the device’s cellular network. The app relies on the internet to make and receive calls which result in a significant bump in battery consumption and processing. The solution - when the app is not running, it should be completely idle and conserve energy.
Incoming VoIP calls are tricky
Traditional VoIP apps have to maintain a persistent connection with the server to receive incoming calls. This results in constant communication between the app and the server in the background to keep the connection alive, even when the app is not in use. Maintaining a persistent connection in the background is taxing on your phone’s battery. When you kill the app completely, connection to the server is lost and the app does not receive incoming calls.
Push notifications is the solution
Instead of persistent connection, using Push notifications is a better way to handle incoming calls on your mobile app. Smartphone users can receive an incoming call even when their phone is locked, or the app is not running in the background. Push notification will be the only way to communicate with your apps running on iOS 13 and above.
Plivo Mobile SDKs are built to provide great VoIP experience in your mobile apps and VoIP Push support comes “out of the box”. Your voice-enabled app simply registers with Plivo to receive incoming calls and Plivo manages the rest.
Benefits of push notifications
- The app wakes-up only when VoIP push occurs, hence saving energy.
- VoIP push goes straight to the app for processing, hence improving efficiency.
- VoIP push is considered high-priority notification and delivered to the app without any delay.
- The app launches automatically when VoIP push is received, removing dependency to keep the app running in the background.
Push notifications with Plivo Mobile SDK
The Plivo Mobile SDK for Android and iOS comes integrated with push notifications. It uses Apple Push Notification service (APNs) for iOS and Firebase Cloud Messaging (FCM) for Android to send notifications to the app.
Apple and Google issue push credentials for iOS and Android apps to receive incoming call alerts when push notifications are enabled on the app. Managing multiple push credentials becomes tricky when you are building apps on different platforms. You are likely to use unique push credentials for apps in different stages of development like alpha, beta or GA. If you are managing several apps with push notifications enabled, you would need to generate credentials for each app.
Multiple push credentials can be easily uploaded on the Plivo dashboard for Plivo to deliver incoming calls to mobile apps. Both iOS and Android Push Credentials are centrally managed in the Plivo dashboard using Mobile Push Credentials.