Skip to Content
0

Android SAP Fiori Client + HCPms + Push Notification

Oct 18, 2016 at 10:07 AM

263

avatar image
Former Member

When I try the push notification from REST client, I see the successfully created code 201 but no message is being pushed to the device and also in results I see “unknown push target type” (attached image1) image1.png

So, I wanted to check if the device is also registered with the GCM server and tried to verify it using REST client and see if I receive the GCMRegistrationID but I do not get this.(attached image2)image2.png

I know that unknown push target type means the push registration is not done completely.But i see registration created in HCPms but may be not created in GCM server.

Is it required to add additional codes in "OnInit" function to register the device like below -

var nTypes = sap.Push.notificationType.SOUNDS | sap.Push.notificationType.ALERT | sap.Push.notificationType.BADGE;

sap.Push.registerForNotificationTypes(nTypes, regSuccess, regFailure, processNotification, ""); //GCM Sender ID, null for APNS

Any inputs please, if something is being missed ?

image1.png (77.6 kB)
image2.png (187.4 kB)
10 |10000 characters needed characters left characters exceeded

Hello Prashanthi,

I don't see any image attached to this query.

well, if you dont see GCMRegistrationID for given AppCID that means app/user is not registered at GCM server.

Can you check if ports are open as per mentioned in this blog? or have you already tried with sample app? Did it work? https://blogs.sap.com/2015/07/17/getting-started-with-kapsel-part-4-push-sp09/

Regards,

JK

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member
Oct 18, 2016 at 04:22 PM
0

Hi JK,

Sorry, attached the images now.

I have seen the blog and I am checking on the ports for GCM, if they are open.

Meanwhile i wanted to check if their could be any other reasons for the issue.

-shanthi

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please cross check what Jeff mentioned below (if not done previously)

If you have already done it, i would suggest you to check server logs for more info.

Increase PUSH component to DEBUG mode and try again. Look into SMP traces and logs.

Regards,

JK

0
avatar image
Former Member
Oct 18, 2016 at 07:44 PM
0

Hi Shanthi,

yes, you absolutely need that code that interfaces to the Kapsel SDK's push plugin to register for push notifications. You also need to go out to Google's developer portal and configure an app their and register it for cloud messaging. Doing this will give you the API KEY and the SENDER ID...you need to enter these into your HCPms admin UI for your application. You also need to put that SENDER ID into your code when calling registerForNotificationTypes(...).

Hope this helps!

Cheers,
Jeff

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Oct 19, 2016 at 08:44 AM
0

Hi Jeff,

I have already configured API Key and sender id in HCPms. But, i did not yet include the code.

I am using a custom fiori client.

Where should the code be written in Ui5 app or in kapsel push plugin?

Cheers,

shanthi

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Oct 19, 2016 at 03:47 PM
0

Hi,

The issue is solved now. The problem was the app id created in firebase (GCM) is not the same as the app id in HCPMs.Because of which the registration id were not getting created in GCM.

Regards,

shanthi

Share
10 |10000 characters needed characters left characters exceeded