[android-developers] Problem on creating Socket

2009-03-24 Thread guishenl...@gmail.com
Hi all, I'm working at an application about network and faced some problem.I did a client which will send some data to the server.But, if the server is not open, my client will in trouble. Here is the code and exact state: try{ Socket netSocket = new Socket("10.0.2.2", 9001);

[android-developers] Re: Problem on creating Socket

2009-03-24 Thread guishenl...@gmail.com
gt;    } > catch(Exception e) > { >     Log.i("Exception","--is"+e.tostring()); > > } > > This will try to connect with in 10 sec if not connected the timeout > exception will raise > > On Tue, Mar 24, 2009 at 12:55 PM, guishenl...@gmail.com < > &g

[android-developers] How to show my ProgressBar

2009-03-24 Thread guishenl...@gmail.com
I want to show a ProgressBar while doing some background operation, but my code seems not to work. I hope someone can help me to solve this problem. Thank you in advance!Here is my code and explanation : public boolean onMenuItemSelected(int featureId, MenuItem item) { switch(item.getIte

[android-developers] Re: How to show my ProgressBar

2009-03-24 Thread guishenl...@gmail.com
Thank you for your reply! On Mar 25, 12:44 pm, Marco Nelissen wrote: > The problem is that your 'backgroundWork()" method is not actually > running in the background, but in the main UI thread. You'll need to > do the work in a separate thread. > > On Tue, Mar

[android-developers] Re: How to show my ProgressBar

2009-03-24 Thread guishenl...@gmail.com
our 'backgroundWork()" method is not actually > running in the background, but in the main UI thread. You'll need to > do the work in a separate thread. > > On Tue, Mar 24, 2009 at 8:02 PM, guishenl...@gmail.com > > > > wrote: > > > I want to show a ProgressBa

[android-developers] Error on adb push

2009-03-30 Thread guishenl...@gmail.com
Hi all, When I tried to copy a file in my PC to the Android Emulator, I used the command "C:\Documents and Settings\Alioth>adb push D:\Data\Android\1.jpg \data \data\". But the it didn't work and the error message was "failed to copy 'D:\Android\1.jpg' to '\data\data\': Read-only file system".

[android-developers] How to Zoom out a picture

2009-03-30 Thread guishenl...@gmail.com
Hi all, If I have a picture file stored in the phone memery (.jpg .bmp etc.),can I use Android API to zoom it out.For example, convert a picture of size 800*800 to 80*80. If anyone knows, please give me some sample code. Thank you in advance! --~--~-~--~~~---~--~---

[android-developers] Re: Problem on creating Socket

2009-03-30 Thread guishenl...@gmail.com
For the PC side, the server code is just the same as usual java server code. And for the emulator side, you need to change the ip address represent local machine from 127.0.0.1 to 10.0.2.2. On Mar 28, 6:04 am, ndefo arnauld wrote: > hi, > please, it is possible to use a socket a android emulator

[android-developers] Re: Error on adb push

2009-03-31 Thread guishenl...@gmail.com
Thanks for your help! On Mar 31, 7:46 pm, Mark Murphy wrote: > guishenl...@gmail.com wrote: > > Hi all, > >     When I tried to copy a file in my PC to the Android Emulator, I > > used the command > > "C:\Documents and Settings\Alioth>adb push D:\Data\Andro

[android-developers] Problem on ImageSwitcher.setImageURI

2009-03-31 Thread guishenl...@gmail.com
Hi all, I tried to show a picture in local file system in a imageswitcher. But I could see nothing but a black screen in fact. Here is my code: public void onItemSelected(AdapterView parent, View v, int position, long id) { Uri imageUri = Uri.fromFile(imageFileDir.listFiles()[po

[android-developers] Question about zoom a picture

2009-04-01 Thread guishenl...@gmail.com
Hi all, I'm learning how to show pictures now, and following the example "ApiDemos" given by sdk.I want to add the zoom function to the ImageSwitcher, but I didn't find useful code in sdk. Can anyone give me some code to help me about zooming the picture in ImageSwitcher? Here is the code of "A

[android-developers] About Video Call

2009-04-02 Thread guishenl...@gmail.com
Hi all, I want to develop an application containing video call, but I didn't find the interface in Android about video call. So I wonder whether Android has this Api in fact, if anyone know it, please tell me.Thank you in Advance! --~--~-~--~~~---~--~~ You rece

[android-developers] Re: Question about zoom a picture

2009-04-06 Thread guishenl...@gmail.com
Nobody knows? On Apr 2, 1:07 pm, "guishenl...@gmail.com" wrote: > Hi all, >    I'm learning how to show pictures now, and following the example > "ApiDemos" given by sdk.I want to add the zoom function to the > ImageSwitcher, but I didn't find useful c

[android-developers] Re: Problem on ImageSwitcher.setImageURI

2009-04-06 Thread guishenl...@gmail.com
Nobody knows? On Apr 1, 12:51 pm, "guishenl...@gmail.com" wrote: > Hi all, >     I tried to show a picture in local file system in a imageswitcher. > But I could see nothing but a black screen in fact. > Here is my code: > >     public void onItemSelected(Ada

[android-developers] Re: How to Zoom out a picture

2009-04-06 Thread guishenl...@gmail.com
Nobody knows? On Mar 31, 12:44 pm, "guishenl...@gmail.com" wrote: > Hi all, >     If I have a picture file stored in the phone memery (.jpg .bmp > etc.),can I use Android API to zoom it out.For example, convert a > picture of size 800*800 to 80*80. If anyone knows, please

[android-developers] Re: Problem on ImageSwitcher.setImageURI

2009-04-07 Thread guishenl...@gmail.com
Thanks for the reply! I've solved the problem by using Uri imageUri = Uri.parse(imageFileDir.listFiles() [position].getAbsolutePath()); mSwitcher.setImageURI(imageUri); On Apr 7, 9:12 am, Mark Murphy wrote: > guishenl...@gmail.com wrote: > > Nobody knows? > > I suspect your

[android-developers] How to add text in ImageButton

2009-04-19 Thread guishenl...@gmail.com
Hi all, I want to use an imagebutton in my application, but only a button with image can not indicate its function clearly. If there are some text beside the button, I think everything will be more explicit. But I don't know how to add text in an imagebutton in Android.Can anyone help me w

[android-developers] Picture supported in Android

2009-04-20 Thread guishenl...@gmail.com
Hi all, I'm doing an application of showing picture with ImageView.I want to know how many kinds of picture are supported in Android, and what are they.Could anyone give a list of these files?Thank you in advance! --~--~-~--~~~---~--~~ You received this message

[android-developers] Re: Picture supported in Android

2009-04-20 Thread guishenl...@gmail.com
Thank you for the help! On Apr 21, 10:34 am, Anonymous Anonymous wrote: > http://developer.android.com/guide/appendix/media-formats.html > > On Tue, Apr 21, 2009 at 8:02 AM, guishenl...@gmail.com < > > > > guishenl...@gmail.com> wrote: > > > Hi all, > &

[android-developers] How to send file by socket

2009-05-05 Thread guishenl...@gmail.com
Hi all, I want to send a file from the Android phone to a server by socket.Could anyone give me some example code about how to do it? Thank you in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Devel

[android-developers] How to get the selected location

2009-05-20 Thread guishenl...@gmail.com
Hi all, I'm working at an application about MapVIew. But I don't know how to respond to a click event on the map and how to get the geographical coordinate of the click. Could anyone give me some sample code to help me ? Thank you in advance! --~--~-~--~~~---~--~---

[android-developers] How to show the search bar

2009-07-21 Thread guishenl...@gmail.com
Hi all, I want to add the search function in my application just as the example given in ApiDemos. But I can't find out how the example add the search bar in the top of the view. Could anyone tell me how to add a search bar to my application by some code? Thank you in advance! reference c

[android-developers] How to get all table names in SQL database

2009-07-28 Thread guishenl...@gmail.com
Hi all, I'm working at an application about SQLite database. I have inserted some table in an database file. But I don't know how to get all the tables' name using code. For example, I defined a database object SQLiteDatabase dataBase = SQLiteDatabase.openOrCreateDatabase(

[android-developers] Re: How to get all table names in SQL database

2009-07-28 Thread guishenl...@gmail.com
ery. > > On Tue, Jul 28, 2009 at 12:45 PM, guishenl...@gmail.com < > > guishenl...@gmail.com> wrote: > > > Hi all, > >      I'm working at an application about SQLite database. I have > > inserted some table in an database file.  But I don't know ho

[android-developers] Re: How to get all table names in SQL database

2009-07-28 Thread guishenl...@gmail.com
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 Jul 28, 12:59 am, "guishenl...@

[android-developers] Re: How to get all table names in SQL database

2009-07-28 Thread guishenl...@gmail.com
I got exception while running dataBase.execSQL. I don't know where the mistake exists. Could anyone tell me? On 7月29日, 上午9时25分, Mark Murphy wrote: > guishenl...@gmail.com wrote: > > I want to get the tables programmatically not in the command line. And > > the database is cr

[android-developers] Re: How to get all table names in SQL database

2009-07-28 Thread guishenl...@gmail.com
ined from cur. Thank all the people above! On 7月29日, 下午12时34分, Marco Nelissen wrote: > If the database was created by you, shouldn't you already know which tables > are in it? > > On Tue, Jul 28, 2009 at 6:18 PM, guishenl...@gmail.com < > > > > guishenl...@gmail.com

[android-developers] Why does setTextFilterEnabled(true) not work?

2009-07-30 Thread guishenl...@gmail.com
Hi all, I want to design a ListView with auto filter fuction, that is, when the user press a key all the items who matches this key will be filtered and form a new list. I selected the method setTextFilterEnabled(true) to implement my function, but it didn't work in fact. Could anyone tell me

[android-developers] Why does TextFilter not work?

2009-07-30 Thread guishenl...@gmail.com
Hi all, I want to design a ListView with auto filter fuction, that is, when the user press a key all the items who matches this key will be filtered and form a new list. I selected the method setTextFilterEnabled(true) to implement my function, but it didn't work in fact. Could anyone tell me

[android-developers] How to wake up the device by Code?

2009-08-06 Thread guishenl...@gmail.com
Hi all, I have an application with notification. I want my notification can wake the device up when it goes off but the device is asleep. Could anybody tell me how to do by some code? Thank you in advance! --~--~-~--~~~---~--~~ You received this message because

[android-developers] Will a notification still work if the device once shut down.

2009-08-06 Thread guishenl...@gmail.com
Hi all, I have an application with notification. I want to keep the notification working even if the device once shut down just like an alarm. Could anyone give me some sample code to help me? Thank you in advance! --~--~-~--~~~---~--~~ You received this message

[android-developers] Re: Will a notification still work if the device once shut down.

2009-08-06 Thread guishenl...@gmail.com
to let your > notification show > > like this:"Notification.flag = Notification.FLAG_AUTO_CANCEL" > > On Aug 6, 4:42 pm, "guishenl...@gmail.com" > wrote: > > > > > Hi all, > >     I have an application with notification. I want to keep

[android-developers] Re: Will a notification still work if the device once shut down.

2009-08-08 Thread guishenl...@gmail.com
ag AlarmManager.RTC_WAKEUP will cause the device to wake up. You can > also try the AlarmManager.ELAPSED_REALTIME_WAKEUP flag. > > Best Regards, > Pradeep Kaushik > > On Fri, Aug 7, 2009 at 10:50 AM, guishenl...@gmail.com < > > > > guishenl...@gmail.com> wrote

[android-developers] Can I calculate the user's moving speed by phone?

2009-07-05 Thread guishenl...@gmail.com
Hi all, I want to develope an application to calculate the user's moving speed by an Android phone like G1(Is it feasible on hardware?). But I don't know whether similar software exists already. If anyone know such similar application please tell me, and it will help me a lot in my design.

[android-developers] NullPointerException when adding an ExpandableListView

2009-07-11 Thread guishenl...@gmail.com
Hi all, I want to add an ExpandableListView in a LinearLayout defined in main.xml. But I met "NullPointerException:null" when I added it to the xml file. I don't know what's wrong with it. Could anyone help me to solve this problem? Thank you in advance! Here is the code of main.xml: