Skip to content
RED SAGSkills
easyMobile App Developer interview question

How do push notifications work in a mobile app?

What the interviewer wants to hear

  • App registers with FCM or APNs and gets a device token
  • Token is sent to and stored by your backend
  • Backend sends a message to FCM/APNs, which delivers it to the device
  • User must grant notification permission
  • Handle token refresh and tapping a notification to open the right screen

Model answer

Push notifications go through the platform services: Firebase Cloud Messaging for Android and Apple Push Notification service for iOS. When the app starts, it asks the user for notification permission, which is required on iOS and on Android 13 and later. It then registers with FCM or APNs and receives a device token. The app sends this token to our backend, linked to the user. When we want to notify someone, the backend sends a request with the token and payload to FCM or APNs, and they deliver it to the device even if the app is closed. In the app I handle token refresh, show the notification correctly in foreground, and when the user taps it I deep link to the right screen.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Mobile App Developer questions