Hi,
I did try to run the application but it is giving me 400 bad request. Please help me solve it.
I am using OutSystems11. I have installed the application on an android device. The application is not running through OutSystems now app. It is really necessary for me do help me.
Regards,
Manthan Shah.
Nuno Miguel Verdasca wrote:
You can try to solve the problem by following these steps:
AddHours(CurrDateTime(),-3)
"%Y/%m/%d %H:%M:%S"
AddHours(NotificacaoForm.Record.Notificacao.Data,3)
This solved the "400 Bad Request" problem and I was able to set the scheduling date and time correctly in the OneSignal API.Cheers,Nuno Verdasca
Thank you so much for the reply, I found out that my problem was caused by MABS version that the app was configured to and after configuring it to a lower version 3.3 it worked perfectly.
Hi Manthan,
Which version of android?
Swatantra Kumar wrote:
Hi any solution?
Manthan Shah wrote:
Hi
I am experiencing the same issue, did you find a solution
I am using android version 7.0.
Hello, the official new OneSignal component from OutSystems has a bug in populating the send_after property internally the component checks if this property is not sent and if it does not populate with CurrDateTime () this will work when the server is set to the American date standard. Just open the OneSignalAPI project in the ServerActions / PushNotifications / PostNotification folder and change the Assign in Has Deeplink's false option to
SyntaxEditor Code Snippet
If(DateTimeToDate(SendAfter) = NullDate(), "", SendAfter)
rather than
If(DateTimeToDate(SendAfter) = NullDate(), CurrDateTime(), SendAfter)
this will solve your bad request, unfortunately even filling in the property will continue with error because the property is like datetime not giving you the freedom to set it the correct in this case would the property be text to each format appropriately according to your situation or a better intelligence within the component to do this taking the format OneSignal hopes to achieve.In addition to the above steps it is necessary to remove the Default value that is like CurrDateTime () from the SendAfter input variables of the PostNotification and SendPushNotificationToUserId methods otherwise even if empty the component will insist on sending the date and time in the wrong format.Hope this helps.
Cheers,Nuno Verdasca