Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Push Notifications on Android are not working

Avatar

Level 2

Has anyone been successful at getting push notifications to work on Android?

The Adobe instructions seem to be out of date because Google has since switched from Google Developer Console to Firebase.

https://helpx.adobe.com/digital-publishing-solution/help/push-notifications.html#push-android

We followed the steps on Firebase to generate the "google-services.json" file and built the app with "Android Push Notifications" enabled in the AEM Mobile dashboard. We updated the Push Credentials in the AEM Mobile dashboard using the info from Firebase.

When we sent out test notifications, the status properties in AEM Mobile dashboard indicated that there were >0 Target Devices and >0 Devices Sent. However, none of our test devices received the notification. (We made sure the APK installed on our test devices have Push Notifications enabled.)

We noticed that in the Firebase console, during the process of "Adding Firebase to your Android App", there is a step called "Add Firebase SDK". I don't know how this can be applied to our AEM Mobile app. Also, Firebase provides a check if the app is communicating with their servers, which does not get validated for us.

8 Replies

Avatar

Level 1

Hi Andrei,

Thanks for bringing this to our attention.  I'm going to look into to this and get back to you with what we find.

It might be worth your while to open a ticket with Customer Care, just so this gets properly tracked.

Mike

Avatar

Level 2

Thank you, Mike. We have a ticket open for this as well. Looking forward to getting this to work.

Avatar

Level 1

Andrei,

I have verified things are working on Adobe's side.  I followed the steps below.  Note the different steps in the Google part - our online docs will be updated to reflect these changes, hopefully soon.

Let us know if you have any questions.

--------------------------------------

AppBuilder

Click Project Settings and hit the Create button to create a new project.  Enter minimal data in fields.

Go to Content & Layouts and add an Article

Add the article to the "default" collection.

Go to Apps and Create an app for Android.  Choose a unique Bundle ID and remember it.

While in this wizard, or before it, you need to create an app in Google Firebase; and you need this Bundle ID.

Google

- Log into Google Firebase (get an account if you don't have one) (https://console.firebase.google.com/ ).

- Create a project if you don't have one.

- Add an app to the project ("Get started by adding Firebase to your app"), on main project page.

- In Android package name enter your Bundle ID.

- Click Register App

- Download the config file (google-services.json) and save it.

- Click Next

- Ignore the next step called Add Firebase SDK

- You won't be able to run your app yet, so skip this step too.

- Click on the gear next to Project Overview.  Choose "Project Settings"

Back in AppBuilder, on the Create New Android App screen, under the App Details tab, go to Android Push Notifications.

- Check Enable push notifications.

- Click on Upload and find your google-services.json file from earlier.  It should show the package name from the project, and the project number and and an SDK App ID too.

- Click the Assets tab and upload a square asset.  This one will be your app's icon on people's devices.

- If you need any plugins in your app, go to the Plug-ins tab and choose them.

- Click Submit when all done.

- Back on the Apps screen, the Downloads may show a busy image, which eventually becomes a link to the unsigned app.

- Click the link to download the app.

- Download the App Signing tool from the same page (the cloud icon with the down arrow on it).  Install the tool on your computer (It's called "AEM Mobile Signing Tool").

Publish the Article

- Go to the Content & Layouts page and select the article you added.  Click on Publish to publish it.

- (This step can even be done after Signing and Installing the App, below.)

Signing and Installing the App

- Create a cert for signing your app.  This page describes how: https://helpx.adobe.com/digital-publishing-solution/help/android-publishing-guide.html

- Run the signing tool.

- In the tool, enter the .apk file you downloaded.

- Enter the name and path of the .p12 file you created earlier, and the password for it.

- Click on Sign Application.  It should create another apk file next to your first one, but with "-signed" in its name.

- Get the apk to your device.  You could just move it to Creative Cloud, One Drive, or Google Drive, and use the same app on your device to open it.  Opening it should install the app.

- Open the app, go to Settings, and ensure "Allow push notifications" is checked.

Notifications

- In AppBuilder, go to the Notifications page.

- Click Push Credentials, and then click on the Android tab.

- Select the app and Click the + Add Credentials at the top of the page.

- For Server API Key, go back to your Google Firebase project settings.  Click on Cloud Messaging, and copy the "Legacy server key".  This is the Server API Key, so paste it into that field.

- For Project Number, add the Sender ID from the same page as your Server API Key.

- Click Create

- To send a notification, select Notifications, choose the Android tab, and click Create -> Text Notification.  By default (if you do not change Delivery Options) it will send the notification as soon as you click Create.  Fill out the Message field, and click Create.

  - It should not matter if your app is running or not.

- You should normally receive the push notification soon, normally within a few seconds.

--------------------------------------------------

Avatar

Level 2

Michael, thank you very much for the detailed steps. I also noticed that documentation was recently updated:

https://helpx.adobe.com/digital-publishing-solution/help/push-notifications.html#push-android

However, I am still unable to get notifications to work. I tried it on our existing app, as well as creating a brand new project to test on, as you outlined above. I downloaded the latest Signing Tool and re-created the .p12 file to eliminate the possibility that I'm using outdated parts.

Every time I sent a notification on AEM Mobile dashboard, the history showed that Target Devices and Devices Sent were greater than 1, but I never received anything on my device. (Notifications were definitely enabled)

We'll have a call with an Adobe Technical Consultant soon to figure this out. I'll share an update once we get this resolved.

Avatar

Level 2

Hi Michael, the Adobe support team is still investigating this issue. They said that the Push Notifications are working fine on live apps (installed from the Play Store). However, they are not working for side loaded apps (development APK). In your description, it seems you didn't install the app through the Play Store and it still worked.

I'm very curious what could be different in your case. I followed your steps exactly as you outlined, trying with our existing app, as well as creating a brand new app from scratch. My method of installing the signed APK onto my devices was through Dropbox, but I don't think this should make any difference. I wonder if it could be because we are in Canada and not US?

Avatar

Level 1

Hi Andrei,

Yes, I side loaded the app when I tested this out.  Also, I'm in Canada too, and I've never heard of differences due to country anyways.  I can't think of what else would be different that would cause this.

Hopefully support will be able to help you.

Mike

Avatar

Level 1

Hey Andrei,

Did you get your issue resolved? we are also facing the same issue with Android app notifications.

We followed the same steps mentioned by Mike for implementation of push notifications.

Thanks.

Avatar

Level 2

No, not yet resolved. I've tried to set this up many times and have not had any luck. An Adobe technical support consultant is looking at our APK build. I'll update you once we hear back. Please let me know if you find a solution as well.