Pushwoosh device registeration error

Pushwoosh device registeration error

  

Hi,

I am new to OutSystems and learning tool to create apps for company. As part of my learning I tried to implement Push notifications for android. I followed the instructions mentioned in this url https://success.outsystems.com/Documentation/Development_FAQs/How_to_Use_Push_Notifications_with_Pushwoosh. These are the steps I did

1) I created pushwoosh account

2) Configured GCM (Google Cloud Messaging) (https://success.outsystems.com/Documentation/Development_FAQs/How_to_configure_Pushwoosh_for_Android)

3) Registered the application in Firebase

4) I created sample mobile app and followed the instructions as mentioned in the tutorial.

5) I generated the android app, and installed it in android phone. 

6) When I sent push notification I see the message appear in Pushwoosh message history.

The problem is, I am not getting push notifications, when I try to register the device I am getting registerdevice.success as false (Please see the attachment). 

Can you someone please help me or point me in right direction to resolve this.

Thanks in advance

MN

Hi Murthy,

Looking at your logic, you are issuing an error when the device is registered correctly (i.e. when Success == True). You should do a "swap connectors" on top of the If element.

Did you follow the other steps on the documentation around pushwoosh? Are you still having trouble receiving notifications?)

Cheers,
R


Hi Rodrigo,

I corrected connectors and now I am not getting any error. I am still unable to get messages on my phone. I can post them successfully, and verified them in PushWoosh also console. Messages were marked as success in PushWoosh, but I am not receiving any notifications. I tested this by installed "apk" file in android phone. I have attached the settings that I made in Firebase and Pushwoosh setting. Please let me know if there is any wrong setting or configuration that I need to correct.

Thank you,

MN

Hello Murthy,

Everything seems to be ok with your configuration. The fact that you have the 1 push enabled device seems to indicate everything is good.

The only 2 things I can think of that may be happening are:

  1. Your app may be running. When the application is running, the notification doesn't show on the device, rather it is sent to the app. You'll need to define what you want the app to do in that situation.
  2. Sometimes push notifications seem to take a while to become active - I'm not sure why this is, but at times I have to wait for some minutes before notifications start to work (this in iOS).

Cheers,
R

Rodrigo Coutinho wrote:

Hello Murthy,

Everything seems to be ok with your configuration. The fact that you have the 1 push enabled device seems to indicate everything is good.

The only 2 things I can think of that may be happening are:

  1. Your app may be running. When the application is running, the notification doesn't show on the device, rather it is sent to the app. You'll need to define what you want the app to do in that situation.
  2. Sometimes push notifications seem to take a while to become active - I'm not sure why this is, but at times I have to wait for some minutes before notifications start to work (this in iOS).

Cheers,
R


Hi Rodrigo,

I see the notifications coming through, I guess I left the app running which didn't triggered the notifications. Now I went and stopped the app completely and I see the notifications popping up. Thank you so much for the help. 

Murthy Nemani wrote:

Hi Rodrigo,

I corrected connectors and now I am not getting any error. I am still unable to get messages on my phone. I can post them successfully, and verified them in PushWoosh also console. Messages were marked as success in PushWoosh, but I am not receiving any notifications. I tested this by installed "apk" file in android phone. I have attached the settings that I made in Firebase and Pushwoosh setting. Please let me know if there is any wrong setting or configuration that I need to correct.

Thank you,

MN

Hi Murthy, 

I have followed the instructions in 

https://success.outsystems.com/Documentation/Development_FAQs/How_to_Use_Push_Notifications_with_Pushwoosh and have similar issue to register any android device. Below is the error while calling the "RegisterDevice" call. How did you correct the connector to fix the issue? Kindly advise



Best Regards

Wilson 

Hello Wilson,

From the message, it seems the plugin isn't properly installed on your application. Have you created a new native application after referencing the plugin?

Cheers,
R

Rodrigo Coutinho wrote:

Hello Wilson,

From the message, it seems the plugin isn't properly installed on your application. Have you created a new native application after referencing the plugin?

Cheers,
R

Thank you for your reply Rodrigo :)

I just regenerated a new apk and reinstalled it to my android.  No luck, still got the same error

do you need my oml file? 

Cheers
Wilson



Yes, the oml file would help, thanks. If you prefer, you can send it via DM.

Hi Rodrigo, 

here is the oml file

Please help and take a look 

Cheers

Wilson


Hi Rodrigo, 

I am having issue to  upload the oml file using the Attachment in this page. Is there any alternative way to send file to you? 

Cheers

Wilson 


Wilson Cheung wrote:

Hi Rodrigo, 

here is the oml file

Please help and take a look 

Cheers

Wilson





Just to be sure, because the app I got from you seems to be different from the one on the screenshot:

You get this error after installing that application on an android phone and clicking the "Register Device to PushWoosh", is that it? Because I tried that (after removing the other dependencies on the app) and it worked...

I also tried to install your app using the QR code you provided, but doesn't seem to be there...

Cheers,
R

Hi Rodrigo, 

You may have to logoff and logon again. The Registerdevice action will call after Dologin action and I got the error from there.  I tried to create another button "Register Device to Pushwoosh" to call Registerdevice action but did not received the device token. 

or you can try to download the .apk from below qr code

Again thank you for your reply 


Best Regards
Wilson 





Rodrigo Coutinho wrote:

Just to be sure, because the app I got from you seems to be different from the one on the screenshot:

You get this error after installing that application on an android phone and clicking the "Register Device to PushWoosh", is that it? Because I tried that (after removing the other dependencies on the app) and it worked...

I also tried to install your app using the QR code you provided, but doesn't seem to be there...

Cheers,
R



Hello Wilson,

I managed to replicate the problem. Seems the error is occurring in the native code... I'm already working with the team that created the plugin to see what's going on. I'll keep you posted.

Cheers,
R

Hi,

Another error we identified with GCM is that if you don't have Google Hangouts installed on your phone and set to receive notifications then the device will not register.

Solution

Hello Wilson,

The issue is that the login screen does not include the "PushwooshNotifications" block. You have the block on the "Layout" block, but not on the "LayoutBlank" (the one used by login).

Once I did that, I was able to register the device and get a token.

Cheers,
R

Solution

Thanks Rodrigo. I will take a look later.  Do you have the working model in .oml or .oap file? can you send it to me.

Cheers

Wilson 



Rodrigo Coutinho wrote:

Hello Wilson,

The issue is that the login screen does not include the "PushwooshNotifications" block. You have the block on the "Layout" block, but not on the "LayoutBlank" (the one used by login).

Once I did that, I was able to register the device and get a token.

Cheers,
R