How to Test Push Notification on Real Android Devices
By Jash Unadkat, Technical Content Writer at BrowserStack - April 28, 2021
A recently published Guide article demonstrated how to test push notifications on real iOS devices. Similarly, this article will demonstrate how developers or QAs can test push notifications for both published and work-in-progress Android apps on real Android devices.
Testing Push Notifications for Published Android Apps
To conduct push notification testing for published Android apps on specific Android devices, follow these steps:
- Signup for free or choose a specific plan on BrowserStack App-Live.
- After successful sign up, wait for the App-Live dashboard to load.
- Once the App-Live dashboard loads, select the Install via Playstore option.
- Choose the desired Android device to test on (For example, Samsung Galaxy S20+).
Refer to the images below for more clarity on the process:
5. Once the selected device loads, login into the Playstore using a Gmail account or the registered mobile number associated with the Google account.
6. Once logged in, search and install the app to be tested from the Play Store.
7. Once the specific Android app is installed, trigger a push notification using a service like FCM (or one preferred by the specific team). Once triggered, the push notification will show up in the notification panel.
In order to test push notifications, one must ensure that the app permissions for receiving push notifications are enabled in the app settings.
Note: This article assumes that developers or QAs have prerequisite knowledge regarding the configuration of Google’s FCM or a third-party service used for sending Push Notifications.
Consider an example of a sample push notification from Facebook on a Samsung Galaxy S20 Ultra.
The Facebook App is directly downloaded from the Play Store and tested for a push notification on a real Samsung Galaxy S20 Ultra.
Testing Push Notifications for Unpublished/Work-in-Progress Android Apps
The process to test push notifications for work-in-progress Android apps remains quite similar and intuitive. Just follow the steps below:
- Signup for free or purchase a suitable plan on App-Live.
- Once the App-Live dashboard opens up, click on the Uploaded Apps section. Next, click on the Upload option to upload the specific app directly from the computer.
Refer to the image below for more clarity:
3. Once the specific Android app is uploaded, it will be visible in the list of recently uploaded apps. Select that app and choose the desired Android device from the list of available devices from popular vendors like Samsung, OnePlus, Xiaomi, Vivo, Google, etc.
As an example, let’s consider a sample BBC news app to be tested on a Samsung Galaxy S20 Ultra. Refer to the image below:
4. A new App-Live session will begin on Samsung Galaxy S20 Ultra, with the parallel installation of the BBC App. The app will be automatically launched after successful installation.
5. As mentioned in the initial method, one must ensure that the app permissions for receiving push notifications are enabled.
Now, trigger a push notification using a service like FCM (or one preferred by the specific team). Once triggered, the push notification will show up instantly on the home screen as well as on the notification panel (Similar to a Facebook notification shown in the first method)
Teams often end up using Android emulators for testing mobile applications and its push notifications. However, the many limitations of emulators and simulators prevent testers from getting accurate test results from them. Emulators are only suitable for testing in the initial stages of development.
What should you test on : Android Emulators vs Real Devices on Cloud?
Besides, it is not feasible for teams to find and test on emulators mimicking each target device type.
Android OS is the market leader with a significant market share of close to 72% (as of the date of publication). For a platform with such a huge user base, accuracy in testing every feature, including push notifications is non-negotiable.
BrowserStack’s real device cloud empowers teams to test their Android apps on real devices without the need for any physical setup. Testing on real devices allows developers to procure and evaluate actual results in real-world conditions.
As all the devices are hosted on the cloud, teams can instantly test their app’s push notifications on Android handsets of their choice from anywhere in the world in a hassle-free manner. No complex set-up, simply login -> upload the app -> select the device, -> and Start testing!. The illustration above will help developers and testers easily test push notifications on real Android devices so as to provide the best possible user experience.