Skip to Content

Add Notification Service to Your Application

test
0 %
Add Notification Service to Your Application
Details
// Explore More Tutorials

Add Notification Service to Your Application

11/30/2018

Beginner
10 min.
Add foreground and background notifications to your application with help of Google Firebase.

You will learn

  • How to add foreground notifications
  • How to add background notifications


THIS TUTORIAL SERIES CAN ONLY BE EXECUTED AT TECHED as it is. Please find us at the Google booth in the AppSpace and we will provide everything you will need.

Step 1: Send a notification

Open the SAP Cloud Platform Mobile Services management cockpit by right-clicking on the link and choose Open link in incognito window.

Management cockpit

Enter the following credentials.

Field Value
Username p2000464045
Password SCP!2pwd

Under Mobile Applications, select Wiz App.

Management cockpit

Select the User Registrations tab to send the notification to your app.

Send notification

It may be difficult to tell which registration to choose. The Last Connection field shows the last time a given registration made a request. If you are unsure which registration to choose, click through a few screens in the application and then press the GO button to refresh the display or select all of them and send a greeting to all the registrations.

Specify the notification text to send to the app.

Send notification
Log on to answer question
Step 2: Receive foreground notification

Notice that the app shows the notification.

Receive notification
Log on to answer question
Step 3: Receive background notification

On the emulator, open another app, such as Chrome, which will cause the Wiz App to no longer be the foreground app.

If you now send another notification you notice that since the app is in the background, or not running, a notification is placed in the notification drawer.

Receive Notification Background

Tapping on the notification will bring the app to the foreground or open the app.

Receive Notification Background

Currently, the message is displayed in an AlertDialog.

Custom logic could be added to the app to decide on the action to take, such as displaying the new Office Furniture category.

Show Notification Code

Further information on push can be found at Push Notifications, Push API Notification Scenarios, and About FCM Messages

Congratulations! You have seen how an app can make use of foreground and background notifications.

Select the correct Option (SAP Cloud Platform Mobile Services) to send notifications to your application:
×

Next Steps

Back to top