OpenEdge.Mobile.PushNotificationService - Forum - Mobile - Progress Community

OpenEdge.Mobile.PushNotificationService

 Forum

OpenEdge.Mobile.PushNotificationService

  • Thanks Edsel...I have seen similar articles about the UDID. Do you know what the mobile app sends to the push notification database when registering. There is a deviceID but it does not match any of the ids I have access to.

  • Hi Roger,

    One of the engineers on the mobile project (Sergey) has the answer, I believe. See below:

    -- peter

    You can not see device id, in settings of your device, or in iTunes.
    For retrieving Device ID, you should use cordova-push-notification plugin  (https://github.com/mgcrea/cordova-push-notification).
    If you want use it in application, you can see as we did in our template "Push Notification UserID Settings". 



    and page contains following code:
        return encodeURIComponent(localStorage.pushNotificationDeviceID);

    And this value passed as deviceID to collection Devices.

  • This is great...let me give it a try.

    THANK YOU.

  • yeah, it looks like all I need is the encodeURIComponent(localStorage.pushNotificationDeviceID).

    thanks.

  • Good to know – we need to add that to the doc.
     
    -- peter
     
    From: rblanchard [mailto:bounce-rblanchard@community.progress.com]
    Sent: Friday, 26 September, 2014 09:25
    To: TU.Mobile@community.progress.com
    Subject: RE: [Technical Users - Mobile] OpenEdge.Mobile.PushNotificationService
     
    Reply by rblanchard

    yeah, it looks like all I need is the encodeURIComponent(localStorage.pushNotificationDeviceID).

    thanks.

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • I may be incorrect but it appears when you create a new project this cordova-push-notification plug-in is already included in project. If I simply drop a button on a page and add the following javascript alert (localStorage.pushNotificationDeviceID); it will return undefined. My guess is because I did not enable PN under appsettings. If I then enable PN under AppSettings and rebuild project my javascript will return the deviceID.

    So, as long as I enable Push Notification the localStorage.pushNotificationDeviceID will be populated.

    Is this the same for the token?

  • Peter,

    Just an FYI that template does NOT work for me. I am guessing it is for Rollbase backend. I modified the URL to the following and it works.

    api.appdesigner.rollbase.com/.../reg{deviceID}

    My guess is all the docs that refer to

    api.mobile.rollbase.com need to be changed to api.appdesigner.rollbase.com when using OE. Either that or the template and all the docs are just wrong...not sure.

  • Thanks Roger,
     
    I'll pass that along too (I suspect you're right).
     
    -- peter
     
    From: rblanchard [mailto:bounce-rblanchard@community.progress.com]
    Sent: Friday, 26 September, 2014 10:41
    To: TU.Mobile@community.progress.com
    Subject: RE: [Technical Users - Mobile] OpenEdge.Mobile.PushNotificationService
     
    Reply by rblanchard

    Peter,

    Just an FYI that template does NOT work for me. I am guessing it is for Rollbase backend. I modified the URL to the following and it works.

    api.appdesigner.rollbase.com/.../reg{deviceID}

    My guess is all the docs that refer to

    api.mobile.rollbase.com need to be changed to api.appdesigner.rollbase.com when using OE. Either that or the template and all the docs are just wrong...not sure.

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • Peter,

    You mentioned that I can add fields to this push notification database. I have done that and created a new field called deploymentID. I then added a new request parameter called deploymentID and the field is updated in the DB. This is pretty cool!!

    Thanks for the help.

  • The last piece to this puzzle is to allow my mobile app to control the registration process. It appears if you enable push notifications in the app that when you install the app or the first time you run the app the device is registered. Is there any way for me to NOT have this happen?

  • No problem at all.  Happy to help.
     
    I don't know if you heard back from TS, but you can workaround your crash by splitting the oPayload = call into 2 parts (define a new oBuilder variable and let that do the building of the message and assign oPayload = oBuider:Payload).
     
    Hth,
    -- peter
     
    From: rblanchard [mailto:bounce-rblanchard@community.progress.com]
    Sent: Friday, 26 September, 2014 10:53
    To: TU.Mobile@community.progress.com
    Subject: RE: [Technical Users - Mobile] OpenEdge.Mobile.PushNotificationService
     
    Reply by rblanchard

    Peter,

    You mentioned that I can add fields to this push notification database. I have done that and created a new field called deploymentID. I then added a new request parameter called deploymentID and the field is updated in the DB. This is pretty cool!!

    Thanks for the help.

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • I will give that a try...thanks,

  • Peter,

    That workaround works great...thanks again!!

  • Peter,

    I am using the push plugin as you described in a prior post. This seems to work just fine. However, all of a sudden the PushInit will work but the registration fails. Is it possible the push notification servers could be down sporadically?

    Is there anyway to determine in the push registration fail event why it is failing?

    My app that was working fine last night will no longer register when it starts...no app changes. It just stopped working. I tried another device...same issue.

  • Hello Roger,

    Just some quick feedback.

    I wonder if the push notification server was or is unavailable due to some cloud machines being restarted based on a requirement by the infrastructure provider.

    Could you contact Technical Support to check if the servers are available?

    Thanks.