[android-developers] Re: Can not install in eclipse
2009/3/30 duguyitian : > > Hi, > > I have installed eclipse 3.4 and JDK6 successfully. However, when try > to install ADT as following steps: > 1. Open eclipse > 2. Help->Software Updates->Available Software->Add Site->Archive > 3. Select "J:\android-sdk-windows-1.0_r1.zip", then, the location will > be"jar:file:J:\android-sdk-windows-1.0_r1.zip!/" > 4. Click "OK" > 5. A message box shows: > > Problem Occurred > No repository found at > jar:file:J:\android-sdk-windows-1.0_r1.zip!/ > See 'Details' for more information. > > Could anyone help me? Hello you're doing it wrong, follow the steps here http://developer.android.com/sdk/1.1_r1/installing.html#installingplugin -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Cupcake coming in April? Where is the SDK?
>>> >> > would give us a week (maybe more) before the operators push it to the >>> end-users. >>> >>> >> > And don't come with the "you can build your own SDK from the >>> >> > opensource tree if you want" - the last releases didn't come from >>> >> > the opensource tree so even if I wanted, i couldn't build the SDK >>> >> > based on the code that's shipped to the end-users. And even if this >>> >> > release will actually come from the public tree, you can't expect >>> >> > all app developers to build their own SDK, can you? We need an >>> >> > official SDK - and we need it as soon as the tree is stable enough >>> >> > (and way before it's pushed to the carriers/end-users) >>> >>> >> > Tauno >>> >>> >> > On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp >>> >> > wrote: >>> >>> >> >> Not if you stay anonymous (hint, hint) ;-) >>> >>> >> >> On Mar 23, 7:58 pm, Anonymous Anonymous >>> >> >> >>> >> >> wrote: >>> >> >>> " Someone from Google? " makes it official i guess :D >>> >>> >> >>> On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp >>> >> >>> >>> >> wrote: >>> >>> >> >>> > Can someone capable just compile the SDK and post it online for >>> >> >>> > everyone? Someone from Google? I dont really care if it's not >>> >> >>> > official, i just dont want to download the source tree just to >>> >> >>> > build the SDK, plus i need to do the tricks you mentioned to >>> >> >>> > make it work on windows. >>> >>> >> >>> > On Mar 23, 1:11 pm, Marco Nelissen wrote: >>> >> >>> > > I certainly hope there aren't "a lot" of applications that >>> >> >>> > > use reflection and private APIs. >>> >>> >> >>> > > On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel >>> >> >>> > > >>> >> >>> > wrote: >>> >>> >> >>> > > > Cupcake is coming, and as you know it will break a lot of >>> >> >>> > > > apps in the market, those that use reflection & private >>> >> >>> > > > api. So where is the Cupcake SDK/emulator for us to try our >>> apps? >>> >>> >> >>> > > > I know we can download the source codes and build it, and I >>> >> >>> > > > know apps wont break if they dont use undocumented api, >>> >> >>> > > > blah blah blah, but we should get an official SDK/emulator >>> >> >>> > > > for cupcake, dont you think, google? >>> >>> >> -- >>> >> Jean-Baptiste M. "JBQ" Queru >>> >> Android Engineer, Google. >>> >>> >> Questions sent directly to me that have no reason for being private >>> >> will likely get ignored or forwarded to a public forum with no further >>> warning. >>> >>> -- >>> Romain Guy >>> Android framework engineer >>> romain...@android.com >>> >>> Note: please don't send private questions to me, as I don't have time to >>> provide private support. All such questions should be posted on public >>> forums, where I and others can see and answer them >> > >> > > > > -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Cupcake coming in April? Where is the SDK?
Shame on met i never read :x This answers a lot 2009/3/24 Romain Guy : > >> I have the impression that the community is very active around >> android-oriented APPS, but not about android itself, maybe there's >> also a problem with this mailing list being filled by requests on the >> use of the SDK but not the development of the SDK, maybe there should >> be a newsgroup dedicated to the android-dev, while this one seems more >> like android-apps-dev. > > That's what android-framework, android-platform and android-porting are about > :) > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them > > > > -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Cupcake coming in April? Where is the SDK?
Original Message- >>> From: android-developers@googlegroups.com >>> [mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste >>> Queru >>> Sent: 24 March 2009 15:39 >>> To: android-developers@googlegroups.com >>> Subject: [android-developers] Re: Cupcake coming in April? Where is the >>> SDK? >>> >>> >>> 1.1 was essentially a update of a few Google-proprietary bits on top of >>> the >>> same platform as 1.0. >>> From the point of view of the Android platform (and therefore of the SDK >>> as >>> well), the differences between 1.0 and 1.1 are extremely minor. >>> >>> Cupcake is a branch name, it's not a released version. A future numbered >>> release will be cut from the cupcake branch, but that product isn't ready >>> yet, and therefore there can be no SDK yet. >>> >>> As cupcake contains significant platform changes compared to 1.0/1.1, you >>> can be sure that you'll have an official SDK for a cupcake-originated >>> release as soon as possible. >>> >>> JBQ >>> >>> On Tue, Mar 24, 2009 at 1:16 AM, tauntz wrote: >>> > >>> > I just hope that this time the release date for the official SDK will >>> > be BEFORE the update hits the masses. Not like it was with the 1.1SDK >>> > - it was released way after 1.1 was released to end-users (the >>> > argument from Google was something in the lines of "Hey, this is a >>> > small release with no mayor changes so don't whine that you get it so >>> > late"). Maybe I'm the only one who thinks that this is ridiculous.. >>> > One of the reasons why we don't have the official 1.5 (or cupcake or >>> > however it will be officially called) SDK is that "It's not stable >>> > enough" - fair enough but I really hope that you guys @ Google will >>> > release it as soon as the code is stable enough (eg the code is tested >>> > and ready to be released to the operators). That would give us a week >>> > (maybe more) before the operators push it to the end-users. >>> > >>> > And don't come with the "you can build your own SDK from the >>> > opensource tree if you want" - the last releases didn't come from the >>> > opensource tree so even if I wanted, i couldn't build the SDK based on >>> > the code that's shipped to the end-users. And even if this release >>> > will actually come from the public tree, you can't expect all app >>> > developers to build their own SDK, can you? We need an official SDK - >>> > and we need it as soon as the tree is stable enough (and way before >>> > it's pushed to the carriers/end-users) >>> > >>> > >>> > Tauno >>> > >>> > >>> > On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp >>> > wrote: >>> >> >>> >> Not if you stay anonymous (hint, hint) ;-) >>> >> >>> >> On Mar 23, 7:58 pm, Anonymous Anonymous >>> >> >>> >> wrote: >>> >>> " Someone from Google? " makes it official i guess :D >>> >>> >>> >>> On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp >>> wrote: >>> >>> >>> >>> > Can someone capable just compile the SDK and post it online for >>> >>> > everyone? Someone from Google? I dont really care if it's not >>> >>> > official, i just dont want to download the source tree just to >>> >>> > build the SDK, plus i need to do the tricks you mentioned to make >>> >>> > it work on windows. >>> >>> >>> >>> > On Mar 23, 1:11 pm, Marco Nelissen wrote: >>> >>> > > I certainly hope there aren't "a lot" of applications that use >>> >>> > > reflection and private APIs. >>> >>> >>> >>> > > On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel >>> >>> > > >>> >>> > wrote: >>> >>> >>> >>> > > > Cupcake is coming, and as you know it will break a lot of apps >>> >>> > > > in the market, those that use reflection & private api. So >>> >>> > > > where is the Cupcake SDK/emulator for us to try our apps? >>> >>> >>> >>> > > > I know we can download the source codes and build it, and I >>> >>> > > > know apps wont break if they dont use undocumented api, blah >>> >>> > > > blah blah, but we should get an official SDK/emulator for >>> >>> > > > cupcake, dont you think, google? >>> >> > >>> >> >>> > >>> > > >>> > >>> >>> >>> >>> -- >>> Jean-Baptiste M. "JBQ" Queru >>> Android Engineer, Google. >>> >>> Questions sent directly to me that have no reason for being private will >>> likely get ignored or forwarded to a public forum with no further >>> warning. >>> >>> >>> >>> >>> >> >> >> > > > > > -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: App localization
2009/3/23 Yossi : > > Hi, > > I'm planning to localize my app (e.g. translate to different > languages). Assuming it will support English and German, does it mean > that users in Germany will get only the German text or would they be > able to choose having it in English? Hi, you should put your strings in string.xml files values-en/strings.xml values-de/strings.xml Check http://developer.android.com/guide/topics/resources/resources-i18n.html for more info They can choose to switch the whole device in english in the Settings -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Problems using WebView.loadDataWithBaseURL
Hi, i'm trying to display a page in UTF-8 encoding (japanese) using a WebView via a direct URL and loadUrl has proven not effective given it seems it doesn't support UTF-8 encoded urls. My code is atm the following and the problem is the source is retrieved but nothing at all is displayed. Did i miss something, the code is working for http://www.google.com but i still have encoding problems on iso-8859-1 aswell (replacing all the UTF-8 by ISO-8859-1) Thanks a lot HttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet("http://ja.wikipedia.org/wiki/刀";); httpget.setHeader("Content-Type","text/html; charset=UTF-8"); HttpResponse response; BufferedReader real_response = null; try { response = httpclient.execute(httpget); new InputStreamReader( response.getEntity().getContent(), "UTF-8")); } catch (Exceptionn e) { e.printStackTrace(); } if (real_response != null) { String data = ""; String tempdata = ""; try { while ((tempdata = real_response.readLine()) != null) { data += tempdata; } } catch (Exception e) { e.printStackTrace(); } wv.loadDataWithBaseURL("http://www.lliane.com/";, data, "text/html", "UTF-8", "about:blank"); } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How can an app own two langues (English and German)
2009/3/22 Nox : > > Hi everyone, > I've developed an app in English,but how can I add German to the same > application??? > > > Thanks in advance > Viktor Hi, you should put your strings in string.xml files values-en/strings.xml values-de/strings.xml Check http://developer.android.com/guide/topics/resources/resources-i18n.html for more info -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Retreivng data from internet source.
2009/3/22 Mark Murphy : > >> I can't find /data/data/my.package.here/files. I don't seem to have a >> data folder. > > Are you working on the emulator, or the device? Be sure you look in the InternalMemory, not the SDCard aswell -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Retreivng data from internet source.
2009/3/22 Mark Murphy : > >> I'm not receiving any error. > > Ah, sorry. I was sifting through earlier messages in the thread and > thought you were getting an error. > >> Its just that when I click the button in >> my application which should call a function to go online and download >> data to the news.txt file, nothing happens. > > The manifest looks OK. > > You use "UTF8" instead of "UTF-8" in your streams, and I think the latter > is the correct value there. UTF-8 and UTF8 are aliased so both of them are ok. And as Mark said your file will be written in /data/data/your.package.here/files -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Retreivng data from internet source.
Hi, you should try something like URL myURL = new URL("http://lol.com/lol.txt";); URLConnection conn = myURL.openConnection(); conn.connect(); BufferedReader is = new BufferedReader(new InputStreamReader (conn.getInputStream(), "UTF8")); FileOutputStream fOut = openFileOutput("lol.txt", MODE_WORLD_READABLE); OutputStreamWriter osw = new OutputStreamWriter(fOut, "UTF8"); String istr; while ((istr = is.readLine()) != null) osw.write(istr+"\n"); osw.close(); This download the http://lol.comlol.txt file to lol.txt local file Also check the DDMS LogCat tab for where your error is. 2009/3/21 murphy : > > Hi all, I am having difficulty retrieving data from the internet to be > displayed in a TextView. When I run the application it says the > application has stopped unexpectedly. I am using the code: > > String urls = "http://www.indulec.ie/weather.txt";; > > HttpClient client = new DefaultHttpClient(); > > // Create a method instance. > HttpGet method = new HttpGet(urls); > method.getParams().setIntParameter > (CoreConnectionPNames.CONNECTION_TIMEOUT, 1 ); > method.getParams().setIntParameter > (CoreConnectionPNames.SO_TIMEOUT, 1 ); > method.getParams().setIntParameter > (CoreConnectionPNames.SOCKET_BUFFER_SIZE, 20 ); > method.getParams().setIntParameter > (ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, 5 ); > method.getParams().setIntParameter > (ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 10 ); > > HttpResponse response = null; > InputStream input = null; > > try > { > response = client.execute( method ); > HttpEntity entity = response.getEntity(); > input = entity.getContent(); > > > > TextView tv = (TextView)findViewById(R.id.somenews); > tv.setText((CharSequence) input); > > setContentView(R.layout.latestnews); > > > } > catch ( IOException e ) > { > Log.d("", "Can not connect to the target server!" ); > try { > throw new IOException(); > } catch (IOException e1) { > // TODO Auto-generated catch block > e1.printStackTrace(); > } > } > finally > { > Log.d("", "close Expired Connections!" ); > client.getConnectionManager().closeExpiredConnections > (); > } > > > > -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How can I Resize Tabs (TabWidget ?)
Ok thanks. On Mar 20, 6:51 pm, mscwd01 wrote: > Unfortunately I dont think there is an easy way to reduce the size of > tabs. The major reason for this being, tabs have to remain easily > tappable - You have to remember the size of the emulator on your > screen is much bigger than the size the tabs will appear on the screen > of a phone. > > If you really must make them smaller i'd suggest designing your own > tabhost using buttons and a viewflipper. > > HTH > > On Mar 20, 1:39 pm, Simon Depiets wrote: > > > Hi, > > I have a little problem, I'm doing landscape layouts and I can't > > resize the Tabs, which are huge like on this example and take nearly > > 1/4 of the screen > > >http://ks363797.kimsufi.com/images/LlianeJapan11.png > > > Editing the android:layout_height of TabWidget just cuts the bottom of > > the tab. > > > Do you have any idea how i could do to reduce the height of the tab. > > > Thanks > > -- > >Llianeaka Simon Depietshttp://www.lliane.comhttp://llianejapan.googlecode.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] How can I Resize Tabs (TabWidget)
Hi, I have a little problem, I'm doing landscape layouts and I can't resize the Tabs, which are huge like on this example and take nearly 1/4 of the screen http://ks363797.kimsufi.com/images/LlianeJapan11.png Editing the android:layout_height of TabWidget just cuts the bottom of the tab. Do you have any idea how i could do to reduce the height of the tab. Thanks -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Server Socket on Real Device
Hi, there is the Socket method : Socket.getLocalAddress().toString(); On Mar 20, 2:50 pm, Cadge wrote: > Ok but what about if the device is not connected to Wifi, is there an > easy way to get the IP address and use sockets as above? > > Thanks again. > > On Mar 20, 1:28 pm, Daniel Janev wrote: > > > Hi, > > > Here is your problem: > > > ... > > socket = new Socket("127.0.0.1", 1234); > > ... > > > Youhave to use the IP address the device has :) "127.0.0.1" means > > localhost :) Just find the IP address (probably you use WLAN of the > > device) and use it in your test. > > > Cadge wrote: > > > Basically what I want to achieve is have a server running on an > > > android device that a P.C/Laptop/whatever can connect to using > > > sockets. > > > > Currently I have this working on an emulator, where I can send a > > > simple text String, but obviously networking on a real divice is > > > different. > > > > I was just wondering what changes to my code I would have to make to > > > get this to work a real device? > > > > Here is the code which works on the emulator. Thanks in advance > > > > <<>> > > > > public void run() { > > > > try { > > > ss = new ServerSocket(1234); > > > } > > > catch(IOException e) { > > > System.out.print(e); > > > System.exit(1); > > > } > > > > while (true) { > > > try { > > > socket = ss.accept(); > > > > in = new BufferedReader( > > > new InputStreamReader( > > > socket.getInputStream > > > ())); > > > > String text = in.readLine(); > > > > } > > > catch (IOException e) { > > > e.printStackTrace(); > > > } > > > } > > > } > > > > <<>> > > > > public TestClient() { > > > > try { > > > socket = new Socket("127.0.0.1", 1234); > > > out = new PrintWriter(socket.getOutputStream(), true); > > > out.println("TEST"); > > > } > > > catch (UnknownHostException e) { > > > e.printStackTrace(); > > > } > > > catch (IOException e) { > > > e.printStackTrace(); > > > } > > > } > > > -- > > > Best Regards, > > Daniel > > --- > > Daniel Janev · Department Manager/Core Platform and Smart Home > > ProSyst Software GmbH > > 1606 Sofia, Bulgaria · Vladajska Str. 48 > > Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17 > > Mobile Phone +359 (0)888 678 670http://www.prosyst.com·d.ja...@prosyst.com > > --- > > stay in touch with your product. > > --- --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Server Socket on Real Device
Hi, there is the Socket method : Socket.getLocalAddress().toString(); 2009/3/20 Cadge : > > Ok but what about if the device is not connected to Wifi, is there an > easy way to get the IP address and use sockets as above? > > Thanks again. > > On Mar 20, 1:28 pm, Daniel Janev wrote: >> Hi, >> >> Here is your problem: >> >> ... >> socket = new Socket("127.0.0.1", 1234); >> ... >> >> Youhave to use the IP address the device has :) "127.0.0.1" means >> localhost :) Just find the IP address (probably you use WLAN of the >> device) and use it in your test. >> >> >> >> Cadge wrote: >> > Basically what I want to achieve is have a server running on an >> > android device that a P.C/Laptop/whatever can connect to using >> > sockets. >> >> > Currently I have this working on an emulator, where I can send a >> > simple text String, but obviously networking on a real divice is >> > different. >> >> > I was just wondering what changes to my code I would have to make to >> > get this to work a real device? >> >> > Here is the code which works on the emulator. Thanks in advance >> >> > <<>> >> >> > public void run() { >> >> > try { >> > ss = new ServerSocket(1234); >> > } >> > catch(IOException e) { >> > System.out.print(e); >> > System.exit(1); >> > } >> >> > while (true) { >> > try { >> > socket = ss.accept(); >> >> > in = new BufferedReader( >> > new InputStreamReader( >> > socket.getInputStream >> > ())); >> >> > String text = in.readLine(); >> >> > } >> > catch (IOException e) { >> > e.printStackTrace(); >> > } >> > } >> > } >> >> > <<>> >> >> > public TestClient() { >> >> > try { >> > socket = new Socket("127.0.0.1", 1234); >> > out = new PrintWriter(socket.getOutputStream(), true); >> > out.println("TEST"); >> > } >> > catch (UnknownHostException e) { >> > e.printStackTrace(); >> > } >> > catch (IOException e) { >> > e.printStackTrace(); >> > } >> > } >> >> -- >> >> Best Regards, >> Daniel >> --- >> Daniel Janev · Department Manager/Core Platform and Smart Home >> ProSyst Software GmbH >> 1606 Sofia, Bulgaria · Vladajska Str. 48 >> Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17 >> Mobile Phone +359 (0)888 678 670http://www.prosyst.com· d.ja...@prosyst.com >> --- >> stay in touch with your product. >> --- > > > -- Lliane aka Simon Depiets Epita Promo 2011,42 http://www.lliane.com A man is smoking with his girlfriend. She angers herself : "don't you see the warning on the box ?!" To which the man replies, "I am a programmer. I don't worry about warnings. I only worry about errors." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] How can I Resize Tabs (TabWidget ?)
Hi, I have a little problem, I'm doing landscape layouts and I can't resize the Tabs, which are huge like on this example and take nearly 1/4 of the screen http://ks363797.kimsufi.com/images/LlianeJapan11.png Editing the android:layout_height of TabWidget just cuts the bottom of the tab. Do you have any idea how i could do to reduce the height of the tab. Thanks -- Lliane aka Simon Depiets http://www.lliane.com http://llianejapan.googlecode.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---