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