Skip to Content
avatar image
Former Member

Android SAP Fiori Client + HCPms + Push Notification

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

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

    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

    Add comment
    10|10000 characters needed 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

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

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2016 at 08:44 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2016 at 03:47 PM

    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

    Add comment
    10|10000 characters needed characters exceeded