blackberry - GET request from Millennial Media Ad server -


Hello I'm trying to request GET from Millennial Media to show ads in my Blackberry Java app but I do not It seems to work for it, this is what I have.

  http connection Conn = null; InputStream Inn = Null; Stringbuff buff = new stringbuffer (); String result = ""; String url = "http://ads.mydas.mobi/getAdapid=157899&auid=ddd25abbb993f79454b12827c803fbafab2ad89b&ua"; Try {conn = (HttpConnection) new connectionFeature (). GetConnection (url) .getConnection (); Conn.setRequestMethod (HttpConnection.GET); Conn.setRequestProperty ("User-agent", "Profile / MIDP-1.0 Confirguration / CLDC-1.0"); If (conn.getResponseCode () == HttpConnection.HTTP_OK) {in = conn.openInputStream (); // Parser.pars (in, handler); Buff.append (IOUtilities.streamToBytes (in)); Results = Buff Tosting (); } Else {Results = "Error in Connection" + conn.getResponseCode (); (SettingWaitScreen) screen) .update (results); } Hold (Exception pre) {ex.printStackTrace (); } Finally {try {if (=! = Null) {in.close (); } Conn.close (); } Hold (IOException e) {e.printStackTrace (); }}  

I do not know if this is the right way, then any help to make this ad request is highly appreciated.

O you're using the wrong base URL.

Please check with the URL below

The URL is working on the browser too.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -