[android-beginners] Re: a problem with connection Http

2009-09-07 Thread Zonakusu

What do you get? nothing? an uncaught exeption (forced quit) or maybe
something else? Use LogCat, that will show you detailed information
about your application.

I use URL and URLConnection to simply load data from the net, this
works like a charm. But I think i'll have to agree with Justin, you
are reffering to localhost while I wonder if your emulator really has
a webserver running :)

On Jul 22, 3:47 pm, Ahmed BEJAOUI ahmed.bejaoui...@gmail.com wrote:
 Hello every body, and excuse me for my poor English .

 I'm trying de build an activity which connect to a servlet. But the command
 execute (httpGet) doesn't work!! i write the permission of internet in the
 manifest.xml, but it doesn't work!!
 heres my code its supposed to connect to the servlet: and thank you

 import java.io.InputStream;

 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.ResponseHandler;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.BasicResponseHandler;
 import org.apache.http.impl.client.DefaultHttpClient;
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;
 import android.widget.EditText;

 public class Connect extends Activity {
     /** Called when the activity is first created. */

     private String adresse = new 
 String(http://localhost:8080/Test_tomcat/Testt;);
     private EditText mTitleText;

     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);
         mTitleText = (EditText) findViewById(R.id.message);
         connect(adresse);
     }

     public void connect(String url){
         try {
             HttpClient httpclient = new DefaultHttpClient();

             // Prepare a request object
             HttpGet httpget = new HttpGet(url);

             // Execute the request
             HttpResponse response;
             try {

                 response = httpclient.execute(httpget);

                  mTitleText.append(connexion);

                 // Get hold of the response entity
                 HttpEntity entity = response.getEntity();
                 // If the response does not enclose an entity, there is no
 need
                 // to worry about connection release

                 if (entity != null) {
                     mTitleText.append(response.getStatusLine().toString());
                 }
                 }catch (Exception e) {mTitleText.append(connexion);
                 }

             httpclient.getConnectionManager().shutdown();

         } catch (Exception e) {
             Log.e(Connect, exception au niveau de l'adresse);

         }

 }
 }


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



[android-beginners] Re: Using dom4j in Eclipse

2009-08-31 Thread Zonakusu

Thanks Xavier i got it working! :)

I will create a blogpost about this matter later today so others don't
have to waste time :)



On 26 aug, 01:43, Xavier Ducrohet x...@android.com wrote:
 Don't put it in src/

 It's common to put it in libs/ so that if someone wants to compile
 your project with the Ant script they can (Ant will import and include
 in your final APK any jar files located in libs/), then right click on
 it in the Package Explorer view of Eclipse and choose Build Path  Add
 to Build Path.. so that eclipse knows it's a library that is part of
 the project.

 Xav



 On Tue, Aug 25, 2009 at 6:22 AM, Zonakusuzonak...@gmail.com wrote:

  Hi!

  I am creating an app that uses a lot of different XML files. Because
  there are so many I don't like the way SAXParser does it, it would
  result in many classes to read all different XML files.

  That's why I want to use a more simple XML parser such as dom4j. Does
  anyone has experience in importing it in Eclipse en running it on
  Android? When I import the .jar file in my /src folder I cant import
  org.dom4j.Document for example.

  Thanks in advance!

 --
 Xavier Ducrohet
 Android Developer Tools Engineer
 Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Using dom4j in Eclipse

2009-08-25 Thread Zonakusu

Hi!

I am creating an app that uses a lot of different XML files. Because
there are so many I don't like the way SAXParser does it, it would
result in many classes to read all different XML files.

That's why I want to use a more simple XML parser such as dom4j. Does
anyone has experience in importing it in Eclipse en running it on
Android? When I import the .jar file in my /src folder I cant import
org.dom4j.Document for example.

Thanks in advance!

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



[android-beginners] Re: Development Phone

2009-08-25 Thread Zonakusu

He means that you can create and install your own software packages
(.apk files) on your phone, but you won't be able to rewrite parts of
the actual operating system.

On 25 aug, 12:06, Rafa Perfeito rafa.perfe...@gmail.com wrote:
 Yusuf,
 Does that means that i can, for example, install new Android versions for
 myself in the device? What do you mean by 'modify the OS on the phone'?

 On Mon, Aug 24, 2009 at 6:20 PM, Yusuf Saib (T-Mobile USA) 



 yusuf.s...@t-mobile.com wrote:

  If you just want to write applications and run them on your phone, any
  Android phone will do. If you want to modify the OS on the phone, then
  you need either an official development phone or hack a non-dev phone
  to be a dev phone.

  Yusuf Saib
  Android
  ·T· · ·Mobile· stick together
  The views, opinions and statements in this email are those of the
  author solely in their individual capacity, and do not necessarily
  represent those of T-Mobile USA, Inc.

  On Aug 24, 6:09 am, Ran dahan...@gmail.com wrote:
   Hi everyone,

   I'm new to Android and I want to start developing and deploying my
   apps to a real phone.
   My question is what is the big difference between the official ADP1
   and other Android phones ?
   What is the benefit of working with ADP1 over the other Android
   phones ?
   I want to buy some Andriod phone, I thought of the new Samsung i7500
   with Andriod OS or HTC Hero, will I be able to develop regularly or I
   will need to hack them in some manner to activate some features ?

   Thanks in advance
   Ran

 --
 Cumprimentos,

 Hugo Rafael Augusto

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