[android-developers] Why there is no call back when a ContentProvider is shut down/destory
Hi, In android API, there is an onCreate() callback when a ContentProvider is created. Can you tell me why there is no call back when a ContentProvider is shut down/destory? And how can I perform some clean up actions when a ContentProvider is shut down/destoryed? Thank you. -- 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] Question about Launcher layout file
Hi, In the launcher layout file (launcher.xml), it uses android:layout_width=match_parent in both DragLayer and Workspace. My question is why it uses 'match_parent' instead of 'wrap_content'? In the launcher, the whole DragLayer should contains 5 cells, each spans 1 phone screens. So shouldn't DragLayer/Worksapce should span 5 phone screens? But if that is the case, why the layout_width is 'match_parent', instead of wrap_content? com.android.launcher2.DragLayer xmlns:launcher=http://schemas.android.com/apk/res/com.android.launcher; android:layout_width=match_parent android:layout_height=match_parent !-- The workspace contains 3 screens of cells -- com.android.launcher2.Workspace android:id=@+id/workspace android:layout_width=match_parent android:layout_height=match_parent include android:id=@+id/cell1 layout=@layout/workspace_screen / include android:id=@+id/cell2 layout=@layout/workspace_screen / include android:id=@+id/cell3 layout=@layout/workspace_screen / include android:id=@+id/cell4 layout=@layout/workspace_screen / include android:id=@+id/cell5 layout=@layout/workspace_screen / /com.android.launcher2.Workspace . /com.android.launcher2.DragLayer -- 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] What is Keyguard in andriod
Hi, In android source code, it has a class called KeyguardViewManager which said 'Manages creating, showing, hiding and resetting the keyguard.'. Can you please tell me how can I invoke Keyguard on my phone? is there an example in my android any default application which shows how the Keyguard is displayed? Thank you. -- 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] Compile froyo source on Mac OS X
Hi, Can you please tell me if we can still compile froyo source on Mac OS X 10.5? Is it true that we need a 64 bit environment and Java 6 in order to compile froyo source? I don't think 10.5 is 64 bits and has Java6. Thank you. -- 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] Why there is no drawable-ldpi directory under frameworks/base/core/res/res
Hi, In android source code, frameworks/base/core/res/res are where android resource files are being saved. My question is why there is no drawable-lpi, there are only drawable-hpi , drawable-mpi. Isn't drawable-lpi is for low density resources, whereas drawable-hpi for high density and drawable-mpi for middle density? Thank you. -- 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 build a sdk so that I can use it with android eclipse
Hi, I am able to download and compile android source on my MacOSX environment. Can you please tell me how can I configure my android adp eclipse plugins so that it uses the android emulator that I built (out/host/darwin-x86/bin/emulator)? Thank you. -- 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 configure list view so that it can put focus to a focusable item within a list item
Hi, Can you please tell me how can I configure list view so that it can put focus to a focusable item within a list item? Android by default puts focus on the whole list item. Can I change it so that it can put focus to a focusable item within that item (e.g. a button)? Thank you. -- 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 create TextAppearanceSpan which looks like an anchor
Hi, Can you please tell me how can I create a TextAppearanceSpan which looks like an anchor (a blue text with a blue underline under the text)? Thank you. -- 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 configure TextView to draw text like an anchor
Hi, Is it possible to setText in TextView to draw like html anchor? (i.e text in blue with a blue underline) Thank you. Sam -- 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 align an ImageView to the right of the Parent?
Basically, I want: --- | ImageView | TextView fill up the rest| ImageView | --- How can I do that? I have put 'android:layout_alignParentRight=true' in my 2nd ImageView, but that does not align to the right of the parent. Any idea please? On Tue, Feb 9, 2010 at 2:23 PM, n179911 n179...@gmail.com wrote: Hi, I have the following l relative layout, which I want an Image to the left and an Image to the right, then the rest is filled by TextView. But I can't get the last image to align right of the parent. I have added 'android:layout_alignParentRight=true' but it does not work. Any idea please? Thank you. RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=?android:attr/listPreferredItemHeight android:padding=6dip ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=fill_parent android:layout_alignParentTop=true / TextView android:id=@+id/text android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignWithParentIfMissing=true android:layout_toRightOf=@id/icon android:layout_alignParentTop=true / ImageView android:id=@+id/button1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_toRightOf=@id/text android:layout_alignParentRight=true android:layout_alignParentTop=true android:src=@drawable/icon / /RelativeLayout -- 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] Re: How can I align an ImageView to the right of the Parent?
Thanks. But I want android framework to align my ImageView with its parent for me. Instead of adjust it myself pixel by pixel. On Wed, Feb 10, 2010 at 6:24 AM, Narendra Bagade bagadenaren...@gmail.com wrote: use android:layout_marginLeft or android:paddingLeft Narendra On Wed, Feb 10, 2010 at 7:47 PM, n179911 n179...@gmail.com wrote: Basically, I want: --- | ImageView | TextView fill up the rest | ImageView | --- How can I do that? I have put 'android:layout_alignParentRight=true' in my 2nd ImageView, but that does not align to the right of the parent. Any idea please? On Tue, Feb 9, 2010 at 2:23 PM, n179911 n179...@gmail.com wrote: Hi, I have the following l relative layout, which I want an Image to the left and an Image to the right, then the rest is filled by TextView. But I can't get the last image to align right of the parent. I have added 'android:layout_alignParentRight=true' but it does not work. Any idea please? Thank you. RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=?android:attr/listPreferredItemHeight android:padding=6dip ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=fill_parent android:layout_alignParentTop=true / TextView android:id=@+id/text android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignWithParentIfMissing=true android:layout_toRightOf=@id/icon android:layout_alignParentTop=true / ImageView android:id=@+id/button1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_toRightOf=@id/text android:layout_alignParentRight=true android:layout_alignParentTop=true android:src=@drawable/icon / /RelativeLayout -- 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 -- Regards, Narendra B 9632382960, Bangalore. -- 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 -- 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 align an ImageView to the right of the Parent?
Hi, I have the following l relative layout, which I want an Image to the left and an Image to the right, then the rest is filled by TextView. But I can't get the last image to align right of the parent. I have added 'android:layout_alignParentRight=true' but it does not work. Any idea please? Thank you. RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=?android:attr/listPreferredItemHeight android:padding=6dip ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=fill_parent android:layout_alignParentTop=true / TextView android:id=@+id/text android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignWithParentIfMissing=true android:layout_toRightOf=@id/icon android:layout_alignParentTop=true / ImageView android:id=@+id/button1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_toRightOf=@id/text android:layout_alignParentRight=true android:layout_alignParentTop=true android:src=@drawable/icon / /RelativeLayout -- 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] Error in compiling android source under ubuntu 9.10
Hi, I have download android source to ubuntu 9.10. And when i 'make', it runs fine for a while. And then I get see this error: host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt) /usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_set:system/core/libcutils/threads.c:36: error: undefined reference to 'pthread_key_create' /usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_set:system/core/libcutils/threads.c:44: error: undefined reference to 'pthread_setspecific' /usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_get:system/core/libcutils/threads.c:27: error: undefined reference to 'pthread_getspecific' collect2: ld returned 1 exit status Can someone please tell me how can I fix it? Thank you. -- 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 add a button to a linear layout 'right justified'
Hi, I have a linear layout like this: LinearLayout android:id=@+id/header android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal android:gravity=center_vertical ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=top android:src=@drawable/img1 / TextView android:id=@+id/atitle android:singleLine=true android:layout_width=fill_parent android:layout_height=wrap_content / /LinearLayout And I need to add a button to the above layout programatically which is right justified? I need to do that in code instead of layout xml file (this is because i can't modify that layout xml file) Here is what I am doing: LinearLayout header = (LinearLayout) findViewById(R.id.header); Button buyButton = new Button(this); buyButton.setText(R.string.buy_ringtone); buyButton.setLayoutParams(new LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); header.addView(buyButton); But the button does not appear. Can you please tell me how can i achieve that? -- 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] Re: How can I add a button to a linear layout 'right justified'
On Tue, Jan 5, 2010 at 11:30 AM, Iroid irfan.f.k...@gmail.com wrote: set the layout weight of TextView to 1. TextView android:id=@+id/atitle android:singleLine=true android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight= 1 / /LinearLayout I have tried this. But when I view the button in HierachyViewer, the height is 48, but the width is 0? Any more idea? Thank you. -- 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] Re: Need help in compiling android source on ubuntu 9.10
I am building on 32 bit system. I have install all the dependencies but i still get the same error. 2009/12/20 Paweł Kapała pawel.kap...@googlemail.com Hi! I successfully built android on Ubuntu 9.10 (a week ago or so). Did you take steps as described here http://source.android.com/download ? Also, are you using 32-bit, or 64-bit system? I'm not a platform developer, but it looks like something in your system is missing or you have something misconfigured. I tried to google-up your error, and it looks like you have some c/c++ libraries missing. Just a wildshot, try installing: sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev -- Best regards, Pawel On Dec 21, 6:04 am, n179911 n179...@gmail.com wrote: Hi, i am trying to compile android (download the source of the master trunk) on ubuntu 9.10. I am getting the following linker error. Can anyone please tell me how to fix it? Thank you. host Executable: acc (out/host/linux-x86/obj/EXECUTABLES/ acc_intermediates/acc) /usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/ accRuntimeTest_intermediates/runtimeTest.o: in function symbolLookup (void*, char const*):system/core/libacc/tests/runtimeTest.cpp:66: error: undefined reference to 'dlsym' collect2: ld returned 1 exit status make: *** [out/host/linux-x86/obj/EXECUTABLES/ accRuntimeTest_intermediates/accRuntimeTest] Error 1 make: *** Waiting for unfinished jobs /usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/acc_intermediates/ main.o: in function symbolLookup(void*, char const*):system/core/ libacc/tests/main.cpp:41: error: undefined reference to 'dlsym' collect2: ld returned 1 exit status -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Need help in compiling android source on ubuntu 9.10
Hi, i am trying to compile android (download the source of the master trunk) on ubuntu 9.10. I am getting the following linker error. Can anyone please tell me how to fix it? Thank you. host Executable: acc (out/host/linux-x86/obj/EXECUTABLES/ acc_intermediates/acc) /usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/ accRuntimeTest_intermediates/runtimeTest.o: in function symbolLookup (void*, char const*):system/core/libacc/tests/runtimeTest.cpp:66: error: undefined reference to 'dlsym' collect2: ld returned 1 exit status make: *** [out/host/linux-x86/obj/EXECUTABLES/ accRuntimeTest_intermediates/accRuntimeTest] Error 1 make: *** Waiting for unfinished jobs /usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/acc_intermediates/ main.o: in function symbolLookup(void*, char const*):system/core/ libacc/tests/main.cpp:41: error: undefined reference to 'dlsym' collect2: ld returned 1 exit status -- 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] Re: How to play media via speaker phone
Thanks Stoffe, Can you please tell me what you mean by using voice call setting? AudioManager.setMode() ? or Acivity.setVolumeControlStream(int streamType) ? On Mon, Nov 16, 2009 at 5:19 PM, Stoffe kristoffer.gronow...@gmail.comwrote: Hi Hap! Try to use the voice call setting. At least when used on AudioTrack the constants seem to be inverted. AudioManager.STREAM_MUSIC seems to play in the earpiece while AudioManager.STREAM_VOICE_CALL on the speaker. Maybe you are suffering from the same effect. BR Stoffe On Nov 13, 10:02 am, hap 497 hap...@gmail.com wrote: I am able play a media using MediaPlayer. The media played via the ear piece. But how can I play the media with speaker phone? I have tried: AudioManager audioManager = (AudioManager) mActivity.getSystemService(Context.AUDIO_SERVICE); audioManager.setSpeakerphoneOn(true); But that does not work. And I have added this to my Manifest file uses-permission android:name=android.permission.MODIFY_AUDIO_SETTINGS / Can someone please tell me what am i missing? Thank you. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Re: How to play the music in the earpiece instead of speaker?
Thank you. But how can I do this in Donut release? The setRouting is private. And when I look at AudioManger.java itself, it does not set Routing to ROUTE_EARPIECE anywhere. On Mon, Oct 19, 2009 at 7:39 PM, feeling3_4 lanwen.ban...@gmail.com wrote: I have find the solution, hope it can help others AudioManager audio_service = (AudioManager) getSystemService (Context.AUDIO_SERVICE); // set the mode in call, so that the sound can come from earpiece audio_service.setSpeakerphoneOn(false); audio_service.setMode(AudioManager.MODE_IN_CALL); audio_service.setRouting(AudioManager.MODE_NORMAL, AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL); On Oct 19, 11:25 pm, feeling3_4 lanwen.ban...@gmail.com wrote: Hi, all In my app, I use the MediaPlayer, the sound comes from the speaker. I just want to know how to play the music in the earpiece. The dev guide says that You can play back the audio data only to the standard output device; currently, that is the mobile device speaker or Bluetooth headset. You cannot play sound files in the conversation audio.. But actually I have seen some apps that can play sound in the channel which conversation audio comes from. Did I miss anything? Thanks in advance. --~--~-~--~~~---~--~~ 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~--- -- 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 embed a ListVIew in my layout xml
Hi, I have a layout xml file which embeds a ListView: ScrollView android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:scrollbarStyle=outsideOverlay android:fillViewport=true LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content !-- some text views, buttons, image views here --- /LinearLayout ListView android:layout_width=fill_parent android:layout_height=wrap_content / /ScrollView I have an adapter to bind/build views for the ListView. It works okay in portrait mode. But when I rotate the device (the height of the screen is shorter, the whole complete does not fit), there is a scroll bar in the ListView part of the view. How can I make it so that the scroll bar is for the WHOLE screen instead of the ListView part of the view? Thank you. -- 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 to draw a border like each row in a list view
Hi, I have tried to draw a horizontal line at the BOTTOM of my linear layout. Here is my linear layout file: LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal android:gravity=center_vertical LinearLayout android:id=@+id/test android:layout_width=fill_parent android:layout_height=wrap_content ImageView android:id=@+id/icon1 android:layout_width=32dip android:layout_height=32dip / /LinearLayout /LinearLayout And I follow your advice and I did add View android:background=@drawable/black_white_gradient android:layout_width=fill_parent android:layout_height=1dp android:layout_above=@id/test / But i dont' see any line at the bottom of the LinearLayout. And when I go to Hierarchy View and see he View (for the hort separator), the getWidth() is 0 while getHeight() is 1. Can you please tell me what am I missing? I have follow the example in for teh gradient dividers: http://www.connorgarvey.com/blog/?p=34 Thank you very much for more pointers. On Tue, Dec 1, 2009 at 9:31 PM, Mark Murphy mmur...@commonsware.com wrote: Hi, Between each row in list view, android draw a horizontal line (fades away at both ends). If I have a LinearLayout view, how can i add a border like that? Add a 1px high View with a suitable background color or gradient in between each of your other widgets in the LinearLayout. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 alway instantiate my ContentProvider
Hi, In my application, I have created a ContentProvider. Is there a way for me to instantiate this ContentProvider when my apk is started? RIght now, the ContentProvider only instantiate when some one does a query. Thank you. -- 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] The proper way to set a timer in android
Hi, What is the proper way to set a timer in android in order to kick off a task (a function that I create which does not change the UI)? Use this the Java way: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Timer.html Or there is a better way in android (android's handler)? Thank you. -- 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 to show a 'Progress View' during a ListView is loading
Hi, In the android market app, the ListView shows a 'ProgressView' during the loading of the content of the ListView, and then when the loading is done, it shows the content of the ListView. Can you please tell me how to achieve that? Thank you. -- 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] Re: ListView not responding to Click or KeyPress
Thank you. On Fri, Dec 4, 2009 at 10:43 AM, Romain Guy romain...@android.com wrote: This is unnecessary. This problem will occur if your list item contains focusable children (like buttons, edittexts, etc.) On Thu, Dec 3, 2009 at 4:20 PM, hwii77 hwi...@gmail.com wrote: maybe maybe try this: Add android:clickable=true (and android:focusable=true) On Dec 2, 1:37 pm, n179911 n179...@gmail.com wrote: Hi, I have a simple ListView in my layout.xml file. ListView android:id=@+id/action_list android:layout_width=fill_parent android:layout_height=wrap_content / And in my javacode, I add a setOnItemClickListener() to my listview: listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView? parent, View view, int position, long id) { System.out.println (get onItem Click position= +position); } }); But when I run on G1. I don't see any print out when I click an item on the ListView on the phone. Or when I select an item using track ball and press CENTER. Can you please tell me why to resolve my problem? Thanks in advance. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] ListView not responding to Click or KeyPress
Hi, I have a simple ListView in my layout.xml file. ListView android:id=@+id/action_list android:layout_width=fill_parent android:layout_height=wrap_content / And in my javacode, I add a setOnItemClickListener() to my listview: listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView? parent, View view, int position, long id) { System.out.println (get onItem Click position= +position); } }); But when I run on G1. I don't see any print out when I click an item on the ListView on the phone. Or when I select an item using track ball and press CENTER. Can you please tell me why to resolve my problem? Thanks in advance. -- 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 to draw a border like each row in a list view
Hi, Between each row in list view, android draw a horizontal line (fades away at both ends). If I have a LinearLayout view, how can i add a border like that? Thank you. -- 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] android Contacts application theme/style
Hi, Can you please tell me why the android Contacts application theme/style is using 'dark' theme? For example, the activity's background is Black instead of White. I have looked at their Android Manifest xml file and their layout xml file (e.g. call details.xml) file, but i don't see how they specified using a 'dark' theme? Can you please tell me how do they do that? I have looked at http://developer.android.com/guide/topics/ui/themes.html, but I don't see Contacts app is doing that. Thank you for any help. -- 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 to make a LinearLayout fousable and its children change foreground color
Hi, I have a LinearLayout with 2 text View as its children. How can I make the children of LinearLayout to change foreground color (in this case, the text color of the text view) when the linearlayout has focus? LinearLayout TextView android:id=@+id/name android:layout_width=wrap_content android:layout_height=wrap_content android:textAppearance=?android:attr/textAppearanceSmall android:textColor=?android:attr/textColorInverse / TextView android:id=@+id/value android:layout_width=wrap_content android:layout_height=wrap_content android:textAppearance=?android:attr/textAppearanceSmall android:textColor=?android:attr/textColorInverse / /LinearLayout Thank you. -- 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 CheckedTextView be instantiated?
In the android source code, CheckedTextView (frameworks/base/core/java/android/widget/CheckedTextView.java) is an abstract class. And yet, in select_dialog_singlechoice (/Volumes/android/mydroid-faves/frameworks/base/core/res/res/layout/select_dialog_singlechoice.xml), it is using CheckedTextView widget: CheckedTextView xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/text1 android:layout_width=fill_parent android:layout_height=wrap_content android:minHeight=?android:attr/listPreferredItemHeight android:textAppearance=?android:attr/textAppearanceLargeInverse android:gravity=center_vertical android:paddingLeft=12dip android:paddingRight=7dip android:checkMark=@android:drawable/btn_check android:ellipsize=marquee / Can you please tell me how does Android instantiated the CheckedTextView given that it is an abstract class when it inflates select_dialog_singlechoice.xml? Thank you. -- 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 in putting android source in eclipse
Hi, I have followed this instruction to put android source in eclipse. http://source.android.com/using-eclipse But I get this error: The project was not built due to A resource exists with a different case: '/donut/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes/MANIFEST.mf'.. Fix the problem, then try refreshing this project and building it since it may be inconsistent Can you please tell me how to fix it? --~--~-~--~~~---~--~~ 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] What is the difference between 'mmm' and 'mm' command
Hi, In android build environment, what is the difference between 'mmm' and 'mm' command? --~--~-~--~~~---~--~~ 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 to fix android.os.DeadObjectException
When android unbind a service I created (service.MyService), I see the following DeadObjectException. Can you please tell me how can I fix this exception? W/ActivityManager( 583): Exception when unbinding service com.mycompany/.service.MyService W/ActivityManager( 583): android.os.DeadObjectException W/ActivityManager( 583): at android.os.BinderProxy.transact(Native Method) W/ActivityManager( 583): at android.app.ApplicationThreadProxy.scheduleUnbindService(ApplicationThreadNative.java:516) W/ActivityManager( 583): at com.android.server.am.ActivityManagerService.removeConnectionLocked(ActivityManagerService.java:9609) W/ActivityManager( 583): at com.android.server.am.ActivityManagerService.killServicesLocked(ActivityManagerService.java:8515) ... Thank you. --~--~-~--~~~---~--~~ 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] Is it possible to check if an activity is enabled or not?
Hi, If i know an activity by class name, is it possible to check if that activity is enabled or not? Thank you. --~--~-~--~~~---~--~~ 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] Does starting a query will notify content observer?
Hi, I have called an AsyncQueryHandler's startQuery function with a specified URL, will all the content observer observing that URL get notified? I asked this question because I don't understand how RecentCallsListActivity's Delete All function works. Here is the code, with comment: case MENU_ITEM_DELETE_ALL: { getContentResolver().delete(Calls.CONTENT_URI, null, null); //TODO The change notification should do this automatically, but it isn't working // right now. Remove this when the change notification is working properly. startQuery(); return true; It appears the call to startQuery() is a work-around to fix the notification not working for the delete() case. But the startQuery is merely calling AsyncQueryHandler's startQuery function. mQueryHandler.cancelOperation(QUERY_TOKEN); mQueryHandler.startQuery(QUERY_TOKEN, null, Calls.CONTENT_URI, CALL_LOG_PROJECTION, null, null, Calls.DEFAULT_SORT_ORDER); This won't trigger any changes in the Calls.CONTENT_URL. So how will this extra call to 'startQuery()' fixes the notification problem described in the comment? Thank you. --~--~-~--~~~---~--~~ 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 to pass a LIst of MyObject in .aidl
I read this. http://developer.android.com/guide/developing/tools/aidl.html And I have * created a MyObject.java which implements Parceable. * created a MyObject.aidl file which just contains: package com.mycompany.mypackage; parcelable MyObject; * In my IMyService.aidl, I have added import com.mycompany.mypackage.MyObject; * in my Android.mk file, I have added: LOCAL_SRC_FILES += \ src/com/mycompany/mypackage/MyObject.aidl \ src/com/mycompany/mypackage/IMyService.aidl \ But when I compile, I get this error: Aidl: Test = src/com/mycompany/mypackage//MyObject.aidl src/com/mycompany/mypackage/MyObject.aidl:19 aidl can only generate code for interfaces, not parcelables, src/com/mycompany/mypackage/MyObject.aidl:19 .aidl files that only declare parcelables don't need to go in the Makefile. make: *** [out/target/common/obj/APPS/Test_intermediates/src/src/com/mycompany/mypackage/MyObject.java] Error 1 I appreciate if anyone can help me. On Tue, Sep 22, 2009 at 5:12 PM, n179911 n179...@gmail.com wrote: I have this method in my .aidl file: void getObjects(out ListMyObject objList); But I get this error src/com/mycompany/mypackage/ITestService.aidl:26 parameter objList (1) unknown type List objList How to create a List of MyObject in .aidl? I know I need to create a Java class MyObject which implements Parceable. I just don't know what I need to do in .aidl file. Thank you. --~--~-~--~~~---~--~~ 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] Question about API Demo Remote Service example
Hi, I am studying RemoteService example in Android's APISample. In the manifest file, it declares the service like this: My question is how can I specify the service to be 'auto-start', i.e. it gets start whenever the phone start? service android:name=.app.RemoteService android:process=:remote intent-filter !-- These are the interfaces supported by the service, which you can bind to. -- action android:name=com.example.android.apis.app.IRemoteService / action android:name=com.example.android.apis.app.ISecondary / !-- This is an action code you can use to select the service without explicitly supplying the implementation class. -- action android:name=com.example.android.apis.app.REMOTE_SERVICE / /intent-filter /service Thank you. --~--~-~--~~~---~--~~ 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 to force a ListView to rebuild/repaint itself
Hi, Is there anyway to force ListView to rebuild/repaint itself? i.e. re-get item from the ListAdapter (it can be a CursorAdapter or ArrayAdapter) and then repaint the all the list view which are visible? Thank you. --~--~-~--~~~---~--~~ 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] Why TabHost always setFocusableInTouchMode to true
Hi, Can you please tell me why TabHost always setFocusableInTouchMode to true? From TabHost source code: private final void initTabHost() { setFocusableInTouchMode(true); setDescendantFocusability(FOCUS_AFTER_DESCENDANTS); } --~--~-~--~~~---~--~~ 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 to change /sdcard to be not a read-only file system
Hi, I am trying to copy an image to the emulator sd card by: $ adb push ~/Desktop/bullet_ball_glass_red.png /sdcard/bullet_ball_glass_red.png But I get an error saying: failed to copy '/Users/n179911/Desktop/bullet_ball_glass_red.png' to '/sdcard/bullet_ball_glass_red.png': Read-only file system So I tried to go to adb shell to manual change the /sdcard to non read-only, but it still wont let me. $ adb shell # su # chmod 777 /sdcard Unable to chmod /sdcard: Read-only file system # --~--~-~--~~~---~--~~ 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 to change /sdcard to be not a read-only file system
Yes, i did start my emulator with -sdcard with the file I created by $ mksdcard 256M sd256m.img $ put images in the img file but when i launch the emulator with '-sdcard', can then click 'Gallery', it shows 'No Media found'. On Wed, Aug 19, 2009 at 4:14 PM, Jack Hajack...@t-mobile.com wrote: It seems like the sdcard is not available. Did you specify the -sdcard when you run the emulator? Or did you enter the SDCard data when you created the AVD? -- Jack Ha Open Source Development Center ・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 19, 3:28 pm, n179911 n179...@gmail.com wrote: Hi, I am trying to copy an image to the emulator sd card by: $ adb push ~/Desktop/bullet_ball_glass_red.png /sdcard/bullet_ball_glass_red.png But I get an error saying: failed to copy '/Users/n179911/Desktop/bullet_ball_glass_red.png' to '/sdcard/bullet_ball_glass_red.png': Read-only file system So I tried to go to adb shell to manual change the /sdcard to non read-only, but it still wont let me. $ adb shell # su # chmod 777 /sdcard Unable to chmod /sdcard: Read-only file system # --~--~-~--~~~---~--~~ 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 to change /sdcard to be not a read-only file system
Thank you for your help. I am building android 1.5r3 from the source. I did $ source build/envsetup.sh $ lunch 1 $ make -j4 after the build is done $ ./out/host/darwin-x86/bin/mksdcard 32M mysdcard.img mount img on my local machine and drag and drop 4 images file to it $./out/host/darwin-x86/bin/emulator -sdcard mysdcard.img The emulator started. But when I go to 'Gallery' App it said 'No Media Found'. I appreciate if you have any idea to my problem. I did 'adb logcat' when I start my emulator. The only int sdcard related I found is 'create NNNA file: /sdcard/DCIM/100ANDRO failed'. Not sure if that is related.: D/dalvikvm( 620): GC freed 1727 objects / 112640 bytes in 85ms I/ActivityManager( 580): Starting activity: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x1020 comp={com.android.camera/com.android.camera.GalleryPicker} } I/ActivityManager( 580): Start proc com.android.camera for activity com.android.camera/.GalleryPicker: pid=710 uid=10003 gids={1006, 2001, 3003} E/ImageManager( 710): create NNNA file: /sdcard/DCIM/100ANDRO failed V/ImageManager( 710): storage state is removed V/ImageManager( 710): storage state is removed V/ImageManager( 710): storage state is removed V/ImageManager( 710): storage state is removed W/IInputConnectionWrapper( 620): showStatusIcon on inactive InputConnection I/ActivityManager( 580): Displayed activity com.android.camera/.GalleryPicker: 827 ms I/ARMAssembler( 580): generated scanline__0077:03545404_0A04_ [ 29 ipp] (51 ins) at [0x18f398:0x18f464] in 793000 ns D/dalvikvm( 620): GC freed 1561 objects / 81728 bytes in 84ms On Wed, Aug 19, 2009 at 4:10 PM, David Turnerdi...@android.com wrote: Are you using the SDK with an AVD? If so, this should not happen. Otherwise, trying using the -sdcard file option, as in: mksdcard 32M mysdcard.img emulator -sdcard mysdcard.img other options On Wed, Aug 19, 2009 at 3:28 PM, n179911 n179...@gmail.com wrote: Hi, I am trying to copy an image to the emulator sd card by: $ adb push ~/Desktop/bullet_ball_glass_red.png /sdcard/bullet_ball_glass_red.png But I get an error saying: failed to copy '/Users/n179911/Desktop/bullet_ball_glass_red.png' to '/sdcard/bullet_ball_glass_red.png': Read-only file system So I tried to go to adb shell to manual change the /sdcard to non read-only, but it still wont let me. $ adb shell # su # chmod 777 /sdcard Unable to chmod /sdcard: Read-only file system # --~--~-~--~~~---~--~~ 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 to change /sdcard to be not a read-only file system
On Wed, Aug 19, 2009 at 5:13 PM, Jack Hajack...@t-mobile.com wrote: If you do a adb shell and cd /sdcard, do you see any files in / sdcard? I do 'ls -l' it shows 'sdcard' as '---' in terms of permission. # ls -l drwxrwxrwt root root 2009-08-19 19:00 sqlite_stmt_journals drwxrwx--- system cache 2009-08-19 19:00 cache d- system system2009-08-19 19:00 sdcard and when I go to 'cd /sdcard', there is no files there. -- Jack Ha Open Source Development Center ・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 19, 5:07 pm, n179911 n179...@gmail.com wrote: Yes, i did start my emulator with -sdcard with the file I created by $ mksdcard 256M sd256m.img $ put images in the img file but when i launch the emulator with '-sdcard', can then click 'Gallery', it shows 'No Media found'. On Wed, Aug 19, 2009 at 4:14 PM, Jack Hajack...@t-mobile.com wrote: It seems like the sdcard is not available. Did you specify the -sdcard when you run the emulator? Or did you enter the SDCard data when you created the AVD? -- Jack Ha Open Source Development Center ・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 19, 3:28 pm, n179911 n179...@gmail.com wrote: Hi, I am trying to copy an image to the emulator sd card by: $ adb push ~/Desktop/bullet_ball_glass_red.png /sdcard/bullet_ball_glass_red.png But I get an error saying: failed to copy '/Users/n179911/Desktop/bullet_ball_glass_red.png' to '/sdcard/bullet_ball_glass_red.png': Read-only file system So I tried to go to adb shell to manual change the /sdcard to non read-only, but it still wont let me. $ adb shell # su # chmod 777 /sdcard Unable to chmod /sdcard: Read-only file system # --~--~-~--~~~---~--~~ 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 to register for SMS database changes
Hi, How can I register for SMS database changes? I tried: mCursor = mActivity.getContentResolver().query(Sms.CONTENT_URI, new String[] { Sms.ADDRESS }, null, null, null); mCursor.registerDataSetObserver(mydataSetObserver); where mydataSetObserver is implemented like this: private class MyDataSetObserver extends DataSetObserver { public void onChanged() { System.out.println (1); } public void onInvalidated() { System.out.println (2); } } But when I tried sending a SMS message in the emulator, MyDataSetObserver never get called. Can you please tell me why? Thank you. --~--~-~--~~~---~--~~ 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] Help in using shape drawable as my background xml
I really appreciate if someone can help me with using how to use shape drawable as my background xml for my view. This is what I tried: But I never get the color. Android always gives me black text on white background, regardless what color attribute I put. ?xml version=1.0 encoding=utf-8? shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=rectangle stroke android:width=1dip android:color=#FBBB / solid android:color=#6000/ /shape I tried this, but does not work shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=rectangle android:color=#6000 /shape I tried , does not work shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=rectangle android:background=#6000 /shape I appreciate if someone can help. --~--~-~--~~~---~--~~ 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 to register for SMS receiver action
Hi, Can you please tell me how to register SMS received ACTION? I tried the following, but when I set up a breakpoint in onReceive() never get called. Please help if you have any idea. import android.provider.Telephony.Sms.Intents; registerReceiver(new MyReceiver, new IntentFilter(Intents.SMS_RECEIVED_ACTION)); private class MyReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { } } --~--~-~--~~~---~--~~ 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] using shape as my background never show the color I specify
Hi, i specify the following xml as my background for my view. It shows the oval, but the color is always white. I have played around with the android:color field, but the color never changes, it is always white. I tried #FF, #ff, #00ff Any idea? Thank you. ?xml version=1.0 encoding=utf-8? shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=oval android:color=#FF /shape --~--~-~--~~~---~--~~ 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: using shape as my background never show the color I specify
I tried using ?xml version=1.0 encoding=utf-8? shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=oval stroke android:width=1dip android:color=#FBBB / solid android:color=#6000/ /shape It should gives me a white circle for my view's background. Any idea? Thank you. On Thu, Aug 13, 2009 at 12:34 PM, n179911n179...@gmail.com wrote: Hi, i specify the following xml as my background for my view. It shows the oval, but the color is always white. I have played around with the android:color field, but the color never changes, it is always white. I tried #FF, #ff, #00ff Any idea? Thank you. ?xml version=1.0 encoding=utf-8? shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=oval android:color=#FF /shape --~--~-~--~~~---~--~~ 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 to simulate a MMS message on android emulator?
Hi, How to simulate a MMS message on emulator? From the eclipse android plugins, I can only see 'SMS' option. I don't see any MMS message. Thank you. --~--~-~--~~~---~--~~ 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] TrackBall 'flinging'
Hi, In android address book, I can 'fling' with a TrackBall. i.e. the ListView page up/down if I 'fling' with TrackBall (not fling on touch screen). However, when I look at the AddressBook Code or ListView Code, I don't see it implements 'dispatchTrackBall' method. Can you please tell me how is that implemented? Thank you. --~--~-~--~~~---~--~~ 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: TrackBall 'flinging'
On Thu, Aug 6, 2009 at 9:35 AM, Dianne Hackbornhack...@android.com wrote: The system automatically converts trackball events into DPAD events if they aren't handled by the app. Thank you. But i only see these DPAD defines in KeyEvent, They don't relate to 'fling' action, right, they just move focus up/down/left/right? public static final int KEYCODE_DPAD_UP = 19; public static final int KEYCODE_DPAD_DOWN = 20; public static final int KEYCODE_DPAD_LEFT = 21; public static final int KEYCODE_DPAD_RIGHT = 22; public static final int KEYCODE_DPAD_CENTER = 23; And I have looked at Gesture Detector code as well, it only handles: MotionEvent.ACTION_DOWN, ACTION_MOVE, ACTION_UP, ACTION_CANCEL, I don't see how Gesture Dectector intercepts any DPAD events or responds to any trackball events. Thank you for any more help. On Thu, Aug 6, 2009 at 9:11 AM, n179911 n179...@gmail.com wrote: Hi, In android address book, I can 'fling' with a TrackBall. i.e. the ListView page up/down if I 'fling' with TrackBall (not fling on touch screen). However, when I look at the AddressBook Code or ListView Code, I don't see it implements 'dispatchTrackBall' method. Can you please tell me how is that implemented? Thank you. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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 specify a border color for an ImageView when it has focus
Hi, In android, how can I specify a border color for an Image View when it has focus? e.g. how to put an orange border around an Image View when it has focus? --~--~-~--~~~---~--~~ 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 to customize focus navigation in a ViewGroup
Hi, I have a View Group and it has 2 focusable Views as its children. I would like know how I can customize how focus is being passed between these 2 Views. In other words, when I press the Down Key or the Up Key in the emulator, i want to control which of these children has focus. I read the JavaDoc of ViewGroup, I see these 2 methods. public View focusSearch (View focused, int direction) public boolean requestFocus (int direction, Rect previouslyFocusedRect) But I am confused which of these method I should over-ride to achieve what I want. Thank you for any advice. Regards, --~--~-~--~~~---~--~~ 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 does android Gallery scrolls on a TrackBall Event
Hi, Can you please tell me how can I make Gallery scrolls on TrackBall Event? Right now, it scrolls when I 'fling' it? Can you please tell me how can I do configure a Gallery to do the same (scrolls left/right) using TrackBall Events? Thank you. --~--~-~--~~~---~--~~ 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 to make andorid plugin does not start everything I launch eclipse
Hi, Is it possible to configure android eclipse plugin that it does not start up whenever I launch eclipse? I don't have android perspective enable, and yet android plugin start itself up as part of eclipse launch (i can tell by ddms port is no available). I would like android plugin to start when I click android perspective. Can you please tell me if that is possible? If so, how? Thank you. --~--~-~--~~~---~--~~ 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] Phone number format when writing to Contact database in android
Hi, Is Phone number normalized to a standard format before writing to the Contacts Database? For example, if user enter 222333 or 222- when 'edit contact', it will be 'normalized' to a standard format (e.g. 222-). If the phone number is normalized to 1 format, then when search for a particular number, I can just search for 222- instead of both 222- or 222333 or any other valid format. Thank you. --~--~-~--~~~---~--~~ 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] Question about setComponent() of Iintent
Hi, I would like to know how to use the setComponent() of Intent. I read the javadoc. But how can I specify the Text Messaging Application when callings setComponent()? * @param component The name of the application component to handle the * intent, or null to let the system find one for you. Thank you. --~--~-~--~~~---~--~~ 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: Question about setComponent() of Iintent
Thank you. I am trying to resolve/work around a problem which I am having when launching MMS Activity. I would like to launch MMS Compose Message Activity with To: field filled and an image attached. This works (send to a specified phone #): intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(smsto:1234567)); This works (attached an image): intent = new Intent(Intent.ACTION_SEND); intent.setType(mMimeType); intent.putExtra(address, item.mValue); intent.putExtra(Intent.EXTRA_STREAM, mUri); But when i combine the 2 together, android can't find an activity for it. intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(smsto:1234567)); intent.setType(image/jpeg); intent.putExtra(Intent.EXTRA_STREAM, mUri); even if i put ClassName in the intent: intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(smsto:1234567)); intent.setType(image/jpeg); intent.setClassName(com.android.mms, com.android.mms.ui.ComposeMessageActivity); intent.putExtra(Intent.EXTRA_STREAM, mUri); I really appreciate if you can help me with this. Thank you. On Thu, Jul 16, 2009 at 7:41 PM, Dianne Hackbornhack...@android.com wrote: That is not what it is for; it is to specify an Intent that is directly targeted to one of your own components. On Thu, Jul 16, 2009 at 7:32 PM, n179911 n179...@gmail.com wrote: Hi, I would like to know how to use the setComponent() of Intent. I read the javadoc. But how can I specify the Text Messaging Application when callings setComponent()? * @param component The name of the application component to handle the * intent, or null to let the system find one for you. Thank you. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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] Problem in running the android sky widget
Hi, I have download the android sky project and able to get it to compile it under eclipse. http://code.google.com/p/android-sky/ But when i try to add a 'Forecast' Widget on emulator, it pops up a 'Configure forecast widget', then I click 'Manual search' , I entered '60005' as my zip code. Then I press the 'Search' Icon. Then what should I do to next? Both 'Verify on Map' and 'Save' buttons are disabled. I am not sure what else do i need to do to run it on emulator? Thank you. --~--~-~--~~~---~--~~ 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 to query the number of unread SMS
Hi, Can you please tell me how can i query the number of unread SMS in android programmically? i.e. How can I implement the SMS unread count like this link: http://android.kanokgems.com/sms-unread-count/ Thank you. --~--~-~--~~~---~--~~ 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: Problem in running the android sky widget
On Tue, Jul 14, 2009 at 11:05 AM, Jeff Sharkeyjshar...@android.com wrote: There have been previous threads about android.location.Geocoder not entirely working in the SDK. That app depends on responses from that API, which is why it's not working. The geocoder works on actual devices, otherwise you could hard-code values when debugging. Thank you. Can you please tell me how to hard-code values? (i.e. which classes to put what hard code values) j On Tue, Jul 14, 2009 at 5:04 AM, bhojvishalb...@gmail.com wrote: same here even I am facing the same problem On Jul 14, 11:07 am, n179911 n179...@gmail.com wrote: Hi, I have download the android sky project and able to get it to compile it under eclipse. http://code.google.com/p/android-sky/ But when i try to add a 'Forecast' Widget on emulator, it pops up a 'Configure forecast widget', then I click 'Manual search' , I entered '60005' as my zip code. Then I press the 'Search' Icon. Then what should I do to next? Both 'Verify on Map' and 'Save' buttons are disabled. I am not sure what else do i need to do to run it on emulator? Thank you. -- Jeff Sharkey jshar...@android.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] Complete Action Using dialog
Hi, Can you please tell me where in the android source code which invokes the Complete Action Using dialog? i.e. when I start an Intent, Android pops up a Complete Action Using dialog. Thank you for any help/pointer. --~--~-~--~~~---~--~~ 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] Can android run java class files
Hi, There are a lot of language which compiles into Java class files when can run on JVM (e.g. JRuby, Scala, Rhino). Can you please tell me if I can take those class files (compiles by the JRuby/Scala/Rhion compiler) and run it on Android platform? Thank you. --~--~-~--~~~---~--~~ 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 to use BitmapFactory.decodeStream to specify the size of my output Bitmap?
Hi, I have the following code which I tried to build a Bitmap from an input stream and I want my output bitmap to be 20 x 20: BitmapFactory.Options opts = new BitmapFactory.Options(); opts.outHeight = 20; opts.outWidth = 20; InputStream stream = // an input stream to my image Bitmap bm = BitmapFactory.decodeStream(stream, null, opts); But when I tried it, I do get a bitmap from the inputstream, but it does not scale it to 20x20 which I specified in the BitmapFactory.Options. Can you please tell me what am I missing? Thank you. --~--~-~--~~~---~--~~ 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 to use BitmapFactory.decodeStream to specify the size of my output Bitmap?
I think I know what is wrong outHeight is output values, not input values. On Wed, Jul 8, 2009 at 4:11 PM, n179911n179...@gmail.com wrote: Hi, I have the following code which I tried to build a Bitmap from an input stream and I want my output bitmap to be 20 x 20: BitmapFactory.Options opts = new BitmapFactory.Options(); opts.outHeight = 20; opts.outWidth = 20; InputStream stream = // an input stream to my image Bitmap bm = BitmapFactory.decodeStream(stream, null, opts); But when I tried it, I do get a bitmap from the inputstream, but it does not scale it to 20x20 which I specified in the BitmapFactory.Options. Can you please tell me what am I missing? Thank you. --~--~-~--~~~---~--~~ 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] What is the version number of Webkit that is android's Webkit is based on?
Hi, How can I find out what is the version number of Webkit (the one from www.webkit.org) that is android's Webkit (the one in external/webkit) is based on? Thank you. --~--~-~--~~~---~--~~ 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 to launch ACTION_SENDTO intent with Intent.EXTRA_STREAM parameter
Hi, My application is able to launch ACTION_SEND_TO with the following code: Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts( mailto, testem...@gmail.com, null)); startActivity(intent4); But when try to attach JPEG file with the Intent Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts( mailto, testem...@gmail.com, null)); String mimeType = Bitmap.CompressFormat.JPEG.name(); intent4.setType(mimeType); System.out.println ( mTempFile + mTempFile); intent4.putExtra(Intent.EXTRA_STREAM, Uri.parse(file://+ mTempFile)); I have checked the file at file://+ mTempFile does exist. But I get this exception: Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.SENDTO type=JPEG (has extras) } E/AndroidRuntime( 1806):at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1484) E/AndroidRuntime( 1806):at android.app.Instrumentation.execStartActivity(Instrumentation.java:1454) E/AndroidRuntime( 1806):at android.app.Activity.startActivityForResult(Activity.java:2656) E/AndroidRuntime( 1806):at android.app.Activity.startActivity(Activity.java:2700) --~--~-~--~~~---~--~~ 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: Passing in a Bitmap as the EXTRA_STREAM parameter when launching an Intent
On Thu, Jun 25, 2009 at 10:44 PM, Sujay Krishna Sureshsujay.coold...@gmail.com wrote: one thing u could do is use a fileobserver, check when the file is opened,accessed n closed, on close delete it... this is also jus a suggestion... i havent tried it yet... If I call the Camera activity like this: i = new Intent( android.provider.MediaStore.ACTION_IMAGE_CAPTURE, null); Does it actually write the captured image to the disk? If yes, can i just get the URL of the captured from the disk of th phone? Thank you. On Fri, Jun 26, 2009 at 11:13 AM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: If u wanna delete the file once the Target activity is over, u can do that in ur onActivityResult(). but i wont guarantee that this will always work bec, if the activity internally triggers a service n dies then u'll have a problem deleting it... if u r mainitaining the status of the file(sent or yet to be sent), then u could have a thread that deletes all files that have been sent... but this is jus a suggestion, there're millions of other ways to do it... On Fri, Jun 26, 2009 at 11:06 AM, n179911 n179...@gmail.com wrote: Thank you. But if I write the image to a file, and invoke an Intent ACTION_SEND, passing that image to the intent. When/how can I delete the file? I can't rely on the ACTION_SEND removes that file for me, since it does not know I wrote the Bitmap to a temp file before I invoke the ACTION_SEND. Thank you for any more tip. On Thu, Jun 25, 2009 at 10:24 PM, Sujay Krishna Sureshsujay.coold...@gmail.com wrote: If u need the image, u definitely have to write it to a file... Use the Images.EXTERNAL_CONTENT_URI.buildUpon() to build a new uri for ur image then use getcontentresolver.openoutputstream to get the outputstream for the uri, write the image content to the outputstream... now u hv persisted ur image n also hv a uri associated to it... On Fri, Jun 26, 2009 at 5:48 AM, hap 497 hap...@gmail.com wrote: HI, From the JavaDoc, the EXTRA_STREAM parameter when launching an intent needs to be an URI. How can I pass a Bitmap object which I get from launching a android.provider.MediaStore.ACTION_IMAGE_CAPTURE intent? /** * A content: URI holding a stream of data associated with the Intent, * used with {...@link #ACTION_SEND} to supply the data being sent. */ public static final String EXTRA_STREAM = android.intent.extra.STREAM; Thank you. -- Regards, Sujay Princess Margaret - I have as much privacy as a goldfish in a bowl. -- Regards, Sujay Yogi Berra - I never said most of the things I said. -- Regards, Sujay Bill Cosby - A word to the wise ain't necessary - it's the stupid ones that need the advice. --~--~-~--~~~---~--~~ 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] Question about getFileStreamPath
In the following code, which create a File object using getFileStreamPath() with temp-wallpaper as parameter. File f = getFileStreamPath(temp-wallpaper); (new File(f.getParent())).mkdirs(); Can you please tell me where is the file actually located? Thank you. --~--~-~--~~~---~--~~ 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: Passing in a Bitmap as the EXTRA_STREAM parameter when launching an Intent
Thank you. But if I write the image to a file, and invoke an Intent ACTION_SEND, passing that image to the intent. When/how can I delete the file? I can't rely on the ACTION_SEND removes that file for me, since it does not know I wrote the Bitmap to a temp file before I invoke the ACTION_SEND. Thank you for any more tip. On Thu, Jun 25, 2009 at 10:24 PM, Sujay Krishna Sureshsujay.coold...@gmail.com wrote: If u need the image, u definitely have to write it to a file... Use the Images.EXTERNAL_CONTENT_URI.buildUpon() to build a new uri for ur image then use getcontentresolver.openoutputstream to get the outputstream for the uri, write the image content to the outputstream... now u hv persisted ur image n also hv a uri associated to it... On Fri, Jun 26, 2009 at 5:48 AM, hap 497 hap...@gmail.com wrote: HI, From the JavaDoc, the EXTRA_STREAM parameter when launching an intent needs to be an URI. How can I pass a Bitmap object which I get from launching a android.provider.MediaStore.ACTION_IMAGE_CAPTURE intent? /** * A content: URI holding a stream of data associated with the Intent, * used with {...@link #ACTION_SEND} to supply the data being sent. */ public static final String EXTRA_STREAM = android.intent.extra.STREAM; Thank you. -- Regards, Sujay Princess Margaret - I have as much privacy as a goldfish in a bowl. --~--~-~--~~~---~--~~ 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] Catching ActivityNotFoundException
The JavaDoc of Context's public abstract void startActivity (Intent intent) said: This method throws ActivityNotFoundException if there was no Activity found to run the given Intent. But when I look at the android source code, it does not catch ActivityNotFoundException. For example in AlarmClock.java: digitalClock.setOnClickListener(new OnClickListener() { public void onClick(View v) { if (true) { Intent intent = new Intent(AlarmClock.this, SetAlarm.class); intent.putExtra(Alarms.ID, id); startActivityForResult(intent, SET_ALARM); } else { // TESTING: immediately pop alarm Intent fireAlarm = new Intent(AlarmClock.this, AlarmAlert.class); fireAlarm.putExtra(Alarms.ID, id); fireAlarm.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(fireAlarm); } } }); Can you please tell me what is the code which handles the case when there is no activity for that intent? Thank you. --~--~-~--~~~---~--~~ 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 to see the content of database on G1
Hi, i hook up my G1 to my laptop and open a 'adb shell'. But as I execute the command 'cd /data/data', I get an error 'opendir failed, Permission denied' $ adb devices List of devices attached HT853GZ21556device $ adb shell $ cd /data/data $ ls opendir failed, Permission denied I tried to cd the the right directory and then do 'sqlite3 mydatabase.db' How can i dump the content of the database on a real device? Thank you. --~--~-~--~~~---~--~~ 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 to listen for 'Enter Key is press' Event
Hi, I have a view and setOnClickListener to be my code. My code get invoked when I move my mouse to the view and click. But how what do i need to register so that it will invoke my code when I navigate the focus (using up/down keys) and it has orange foreground and press ENTER key? Thank you. --~--~-~--~~~---~--~~ 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 to listen for 'Enter Key is press' Event
Thanks. I would like to know how to listen for 'Enter Pressed' Key event for my view? On Sun, Jun 21, 2009 at 6:09 AM, 2hilldead2h...@gmail.com wrote: To get the orange foreground you need to describe the in the xml as focusable. Then add the corresponding focused drawable. when the user runs over it the resources will pull the focused drawable. Hope that helps! On Jun 21, 1:25 am, n179911 n179...@gmail.com wrote: Hi, I have a view and setOnClickListener to be my code. My code get invoked when I move my mouse to the view and click. But how what do i need to register so that it will invoke my code when I navigate the focus (using up/down keys) and it has orange foreground and press ENTER key? Thank you. --~--~-~--~~~---~--~~ 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] Intent.FLAG_ACTIVITY_NEW_TASK
Hi, What is the meaning of 'addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);' in the following code? Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(url)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); I don't see any difference with or without that line of code. Thank you. --~--~-~--~~~---~--~~ 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] Number of threads in Render Process on MacOSX
From this post http://blog.marcchung.com/2008/09/05/chromes-process-model-explained.html, it said Each Renderer process has two threads: one Render thread–which renders web pages, and one IPC thread–which transports data in a thread-safe, non- blocking manner between the Render thread and an IPC counterpart sitting in the Browser process. The Renderer process manages 1 IPC thread and 1 Render thread. But when i see that ActivityMoniter on MacOSX, it has 3 threads: 262 Chromium john 0.0 3 32.77 MB974.34 MB Intel 189 Chromium john 0.4 16 65.57 MB1.03 GB Intel 307 Chromium john 1.3 3 51.77 MB992.93 MB Intel 295 Chromium john 0.0 3 56.07 MB992.88 MB Intel Can you please tell me what is the 3rd thread? Thank you. --~--~-~--~~~---~--~~ 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: Number of threads in Render Process on MacOSX
Sorry, wrong mailing list On Sat, Jun 20, 2009 at 4:37 PM, n179911n179...@gmail.com wrote: From this post http://blog.marcchung.com/2008/09/05/chromes-process-model-explained.html, it said Each Renderer process has two threads: one Render thread–which renders web pages, and one IPC thread–which transports data in a thread-safe, non- blocking manner between the Render thread and an IPC counterpart sitting in the Browser process. The Renderer process manages 1 IPC thread and 1 Render thread. But when i see that ActivityMoniter on MacOSX, it has 3 threads: 262 Chromium john 0.0 3 32.77 MB 974.34 MB Intel 189 Chromium john 0.4 16 65.57 MB 1.03 GB Intel 307 Chromium john 1.3 3 51.77 MB 992.93 MB Intel 295 Chromium john 0.0 3 56.07 MB 992.88 MB Intel Can you please tell me what is the 3rd thread? Thank you. --~--~-~--~~~---~--~~ 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] Can I dynamically switch Adapter of a Gallery
Hi, Is it possible for me to dynamically switch the adapter of a Gallery? In the onCreate() of my activity, I did this: myGallery.setAdapter(adapter1); And then later on in my code, I did myGallery.setAdapter(anotherAdapter1); I tried, that but in the emulator, the myGallery never gets update when I do 'setAdapter' again. How can I force myGallery free up all the items when it was using adapter1 and then makes it repopulate items for anotherAdapter1? Thank you. --~--~-~--~~~---~--~~ 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 to enable SkDEBUGF printf
Hi, In android c++ code, there are SkDEBUGF printf for debugging purpose. Can you tell me how to enable SkDEBUGF so that i can see the output on 'adb logcat'? Thank you. --~--~-~--~~~---~--~~ 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: Return value of getDrawingCache
Thank you. Can you please tell me if there is any API which can capture a View/ViewGroup of what is visible on screen? The result can be a Bitmap or a Picture? On Thu, Jun 18, 2009 at 10:30 AM, Romain Guy romain...@google.com wrote: Just what the doc says: 'a bitmap representing this view.' That's the whole View. On Wed, Jun 17, 2009 at 9:57 AM, n 179911n179...@gmail.com wrote: Hi, From the JavaDoc, it said it returns 'a bitmap representing this view or null if cache is disabled'. My question is what if the View is longer than the phone screen (you need to scroll vertically), what does the bitmap return? * only the visible portion of the view * everything the view has (both visible + invisible part) Thank you. -- 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 --~--~-~--~~~---~--~~ 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] Register to listen for outgoing calls
Hi, On android, is it possible to listen for all outgoing call events? i.e. my code get invoked when users make an out-going phone call? One possible way is to periodically pull call-log database for that information. But I would like to know if i can register for a notification when outgoing call happens? Thank you. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---