Push notifications and format not supported error - SDK Rad Studio(Delphi)

0 votes

Hi,

Using Delphi XE7, win8.1, I am trying to send push notifications to an user but I get an error of "format not supported".

I am using the native component to fill the data of the message. So, I don´t understand why I get this error.

Here is what I am doing.

I put a TApp42Provider and a TBackEndPush in a form.

I created a user to receive push notifications using the sdk sample provided.

I did the settings of BackEndPush Provider property to App42Provider and put the correct keys(secret key. api key and master key).

Here is my test:

procedure TForm2.Button1Click(Sender: TObject);
begin
with App42Provider1 do begin
   AndroidPush.GCMAppID:='XXXX';
   apiKey:='xxxxxxxxxxxx;
  Adminkey='yyyyyyyyy';
   secretkey:='zzzzzz';
  username='testuser';
  apiversion:=´1.0';

end;

with BackendPush1 do begin
  Provider:=App42Provider1;

  with GCM do begin
    Title:=’Meu Titulo’;  
     Message:=’GCM Message’;
  end;
  Message:=’BackEnd Msg’;

  Push; -->Here I get an error

end;

end;

The Error is:

<html><head><title>Apache Tomcat/6.0.39 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 415 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.39</h3></body></html>

 

Thanks in advance, Luiz

 

 

 

asked May 8, 2015 in App42 Cloud API-BaaS by cprmlao (10 points)
Can you please let me know which method of Push is causing this issue? I am not able to get it by looking at your code snippet. Looks like request is going on wrong resource.
Hi,

The  Method is "Push" of TBackEndPush.

BackEndPush.Push;

Only as Information. It´s works well with Kinvey and Parser
 I am trying to send push notifications from my app server to android device.
Luiz

1 Answer

0 votes
Hello Luiz, 
 
At present we are not supporting sending push from device. 
For now you can only recieve the push on device through AppHQ Console or from other Server side sdk like Java , c# , php etc.
 
Thanks
Akshay
answered May 9, 2015 by Akshay.Mishra (179 points)
Hi,
I am not sending push notifications from device. I did a server and I am trying to send the message from server to device. The code that I posted is in the server app.

Luiz
Sending Push from C++/Delhi is not implemented in App42 interface. You can send it form AppHQ console or using other server side language like Java , c# , php etc. Let me know if you need any help in writing this code using these languages.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...