Original Article: http://www.screaming-penguin.com/node/7746 public class Main extends Activity { private static final String NAME = “NAME”; private EditText input; private Button saveButton; private Button deleteButton; private TextView output; private MyApplication application; @Override public void onCreate(final Bundle savedInstanceState) { Log.d(MyApplication.APP_NAME, “onCreate”); super.onCreate(savedInstanceSt<wbr>ate); this.setContentView(R.layout.m<wbr>ain); // get “Application” object for shared state or creating of expensive resources -…
Day: January 3, 2011
Talking To Web Servers Via HTTP In Android 1.0
Original Article: http://brainflush.wordpress.com/2008/10/17/talking-to-web-servers-via-http-in-android-10/ HttpClient httpClient = new DefaultHttpClient(); StringBuilder uriBuilder = new StringBuilder(SERVICE_ENDPOINT); uriBuilder.append(“?param0=” + param0); uriBuilder.append(“¶m1=” + param1); uriBuilder.append(“¶mN=” + paramN); HttpGet request = new HttpGet(uriBuilder.toString()); HttpResponse response = httpClient.execute(request); int status = response.getStatusLine().getStatusCode(); // we assume that the response body contains the error message if (status != HttpStatus.SC_OK) { ByteArrayOutputStream ostream = new…
Https returns 404 with DefaultHttpClient on Android?
Reference: http://stackoverflow.com/questions/3730760/https-returns-404-with-defaulthttpclient-on-android I have an http request that worked as http://blah.com and now I have been asked to usehttps://blah.com The former works and the later fails with a Network I/O error. Are there any missing parameter settings that I need for the client? Answer Https almost always implies a different port being used (standard http=>80; standard https=>443)….
DroidDraw Beta
User Interface (UI) designer/editor for programming the Android Cell Phone Platform http://www.droiddraw.org/
How to fix java.net.UnknownHostException on Android
Original Article: http://jesper.storm-frandsen.dk/pages/How_to_fix_java.net.UnknownHostException_on_Android.php Start the emunator manually with the following command. The trick worked for me, when everything else did not work. C:\android\tools>emulator -avd Legend78 -dns-server 8.8.8.8 The IP address 8.8.8.8 is google-public-dns-a.google.com Or configure Eclipse in the Run or Debug configuration.