Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Webservices doesnt send message

$
0
0

Hi I build an and published into playstore and itunes. the app consume a java webservice hosted in an unix server that check some db to changes to send notifications from a subscribed ACS.

The problem is that the app doenst recieve the notifications, but when i send a direct message from the ACS platform it works.

I am using this webservice :

private static final String WS_PUSH = "https://api.cloud.appcelerator.com/v1/push_notification/notify_tokens.json?key=" + Common.getWsPushKey() + "&pretty_json=true";

and in this method i send the message trough a proxy connection.

public static JSONObject readUrl(String url, List<NameValuePair> params) throws IOException, java.text.ParseException { JSONObject jsonObject = null; try { DefaultHttpClient httpclient = new DefaultHttpClient(); HttpHost proxy = new HttpHost("proxyxyz.com.co",1111); httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy); HttpPost httppost = new HttpPost(url); if (params != null) { httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); } //Execute and get the response. HttpResponse response2 = httpclient.execute(httppost); HttpEntity entity = response2.getEntity(); if (entity != null) { String content = EntityUtils.toString(entity); jsonObject = new JSONObject(content); } } catch (IOException | ParseException e) { log.error("ERROR readUrl " + e); throw e; } return jsonObject; }

The log shows that the message is send but i cant get any on my device.

Can you please help me, with some idea ? is the webservice correct ?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>