Isn't AMReceiver part of your app? You need to register it, most
likely by adding a <receiver> tag to the manifest.

On Jun 21, 10:52 am, Abhilash Cherukat <abhi.cheru...@gmail.com>
wrote:
> package com.HttpTest;
>
> import java.io.*;
> import java.util.ArrayList;
> import java.util.List;
>
> //import org.apache.http.HttpEntity;
> import org.apache.http.HttpResponse;
> import org.apache.http.NameValuePair;
> import org.apache.http.client.ClientProtocolException;
> import org.apache.http.client.HttpClient;
> import org.apache.http.client.entity.UrlEncodedFormEntity;
> import org.apache.http.client.methods.HttpPost;
> import org.apache.http.impl.client.DefaultHttpClient;
> import org.apache.http.message.BasicNameValuePair;
> //import org.apache.http.protocol.HTTP;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.EditText;
> //import android.util.Log;
> //import android.widget.EditText;
>
> public class HttpTestActivity extends Activity {
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>      // Create a new HttpClient and Post Header
>         HttpClient httpclient = new DefaultHttpClient();
>         HttpPost httppost = new HttpPost("http://localhost/
> TestUp.php");
>
>         try {
>             // Add your data
>             List<NameValuePair> nameValuePairs = new
> ArrayList<NameValuePair>(2);
>             nameValuePairs.add(new BasicNameValuePair("ID", ""));
>             nameValuePairs.add(new BasicNameValuePair("Name",
> "Killer"));
>             httppost.setEntity(new
> UrlEncodedFormEntity(nameValuePairs));
>
>             // Execute HTTP Post Request
>             HttpResponse response = httpclient.execute(httppost);
>             EditText txt=(EditText)findViewById(R.id.editText1);
>             txt.setText(response.toString());
>
>         } catch (ClientProtocolException e) {
>             // TODO Auto-generated catch block
>         } catch (IOException e) {
>             // TODO Auto-generated catch block
>         }
>     }
>
>     }
>
> ************************THis is my java file**********************
>
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>       package="com.HttpTest"
>       android:versionCode="1"
>       android:versionName="1.0">
>     <uses-sdk android:minSdkVersion="8" />
>     <uses-permission android:name="android.permission.INTERNET"></uses-
> permission>
>     <application android:icon="@drawable/icon" android:label="@string/
> app_name">
>         <activity android:name=".HttpTestActivity"
>                   android:label="@string/app_name">
>             <intent-filter>
>                 <action android:name="android.intent.action.MAIN" />
>                 <category
> android:name="android.intent.category.LAUNCHER" />
>             </intent-filter>
>         </activity>
>
>     </application>
> </manifest>
>
> *******  THis is my manifest file *****************
> When i run the application there is no error in the emulator. But i am
> getting some log errors what should i to
> ---------------------THis is the error i am
> getting---------------------
> !ENTRY com.android.ide.eclipse.adt 4 0 2011-06-21 18:04:26.484
> !MESSAGE Failed to load properties file for project 'HttpTest'
>
> !ENTRY com.android.ide.eclipse.adt 4 0 2011-06-21 18:38:48.281
> !MESSAGE No command output when running: 'am start -n com.HttpTest/
> com.HttpTest.HttpTestActivity -a android.intent.action.MAIN -c
> android.intent.category.LAUNCHER' on device emulator-5554
> !STACK 0
> com.android.ddmlib.ShellCommandUnresponsiveException
>         at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
> 408)
>         at com.android.ddmlib.Device.executeShellCommand(Device.java:276)
>         at
> com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(ActivityLaunchAction.java:
> 74)
>         at
> com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(AndroidLaunchController.java:
> 1147)
>         at com.android.ide.eclipse.adt.internal.launch.AMReceiver
> $1.run(AMReceiver.java:120)
>
> Am using eclipse to develop
> THanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to