[android-developers] How i call class into my activity?
Hello i find this class for upload data...but how i call it from my Activity?On create... public class SimpleHttpPut { public static void main(String[] args) { HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost(http://www.power7.net/temp.php;); try { ListNameValuePair nameValuePairs = new ArrayListNameValuePair(1); nameValuePairs.add(new BasicNameValuePair(temp,30)); post.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = client.execute(post); BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); String line = ; while ((line = rd.readLine()) != null) { System.out.println(line); } } catch (IOException e) { e.printStackTrace(); } } } -- 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
Re: [android-developers] How i call class into my activity?
On Mon, Dec 17, 2012 at 10:36 AM, Antonis Kanaris ant...@in.gr wrote: Hello i find this class for upload data...but how i call it from my Activity? Learn Java and I'm sure you'll be able to figure it out. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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