I'm trying to sent a simple HTTP-Request through Android when I'm pressing a certain button. But every time I do so, my app force closes. Why?
I am really in pain right now please help me solve this issue.
I've previously also tried to make the http request to my localhost and it all works fine but right now it is not working and I don't know why.
I am trying to make the request from the following code.
HttpClient httpclient = new DefaultHttpClient();
String result="";
try
{
HttpPost httppost = new HttpPost("ht
I have created a project in which, android main activity sends a string value using HttpPost method to servlet on button click.
On other hand requested servlet gets the string value, stores in Datastore(Appengine) Entity and afterward displays on webpage.
Here is android side Code---
public void onClick(View v) {
String message = et.getText().toString();
HttpClient httpclient = new
I want to pass array of String (itemname) to a php file (PlaceOrder.php) using name value pair.
When I click on PlaceOrder button it passes null value in database.
I'm trying to post combination of string to my backend server. How can I achieve that using BasicNameValuePair.
Can't figure why my application has such a slow response times with the button.
Hi i am writing an app which access the mysql database to retrieve some data from the database and display it in the form of a table.
My problem is that the data is not displaying.
This is where i am trying to access the database.
public class GetDataFromDB {
public String getDataFromDB() {
try {
HttpPost httppost;
HttpClient httpclient;
httpcli
I am making a chat app. How to upload to the server after record? How the server saves this?
I pass webservice and serves is asp.net. The record is OK and it can save to SD card. Like the format 001.amr.
I use HttpClient to upload it to the server.
//here i put my json file and it return only array inner elements not array name so i tried to parse //it but without array name i couldn't do it
//my json
{
"to": "USD",
"rate": 0.98087299999999999,
"from": "CAD",
"v": 1.961746
}
//code to getJson from url
public JSONObject getJSONFromUrl(String url) {
// Making HTTP request
try {
// defaultHttpClient