i'm sending a post using this code:
try {
// Add your data
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("imagem", "1"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
} catch (IOException e) {
// TODO Auto-generated catch block
}
v.setEnabled(true);
it works fine on my emulator. I have already searched on other posts how to solve this and what i have found was something about the android manifest having internet permission. Here is my manifest:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="imp.projecto.teste.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".ActivityImagem" />
<activity android:name=".ActivityVideo" />
<activity android:name=".ActivityMusica" />
<activity android:name=".ActivityRadio" />
<activity android:name=".ActivityOpcoes" />
</application>
I have no idea if i used the internet permission code in the right place and if it is doing it's job. I really need some help and some orientation.