09-21-2011 09:43 AM
I am trying to set up an http post in my Blackberry app. I have successfully implemented this in my corresponding Android app, so I know the server it working find. I have tried several different things, and I'm not really getting errors, its just the info on the server is not getting updated. I have looked at this post: Http POST in BlackBerry, and several others. I found them helpful, but they didn't ultimately solve my problem. Again, I don't get errors, but the server doesn't get updated. Here is the code I am currently using:
String url = "http://xxxx.com/ratings/add?;deviceside=true"; String postStr1 = "business_id=790"; String postStr2 = "&rating=4"; HttpConnection httpConnection = (HttpConnection) Connector.open(url); httpConnection.setRequestMethod(HttpConnection.POS
T); httpConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); URLEncodedPostData encPostData = new URLEncodedPostData("UTF-8", false); encPostData.append("business_id", String.valueOf(790)); encPostData.append("rating", String.valueOf(4)); byte postData = encPostData.toString().getBytes("UTF-8"); httpConnection.setRequestProperty("Content-Length" , String.valueOf(postData.length)); OutputStream os = httpConnection.openOutputStream(); os.write(postData); os.flush();
Solved! Go to Solution.
03-28-2014 09:12 AM
Please help me out.
I have developed the app but not able to deploy it on device using the BB Desktop software 7.1.0 (Latest version available) .
I have developed the app with Blackberry JDE 7.0 since the BB torch 9810 is also BB JDE 7.0 compliant.
Via eclipse the application is easily deployed to the device but my client which is trying to deploy it on his device using the BB desktop software is not able to deploy it.
Attached is the screen shot of the problem which i am facing..
03-28-2014 09:59 AM
This is a separate problem to the Thread you have attached it to. Please start a new Thread with your problem. There is a "New Message" button on the list screen for doing this.
When you do start a new Thread, please describe how you have packaged up the application for distribution to the client.
This documentation should help: