[android-developers] Re: Reg playing youtube video in android
I'm pretty sure this is due to the way the emulator handles UDP packets. There is an outstanding bug about this, but no one has had time to work on it. On Feb 9, 10:59 pm, Harishkumar V wrote: > Michael, > > using browser running in the android in emulator mode, i > launchedhttp://m.youtube.com. > it opened up a page contaning list of video files. when i click any one of > them, it starts to load video, but finally it fails with the message, > > "Sorry, this video cannot be played". > > using adb logcat, i got the log messages as, > > I/ActivityManager( 50): Starting activity: Intent { > action=android.intent.action.VIEW > categories={android.intent.category.BROWSABLE} data=rtsp:// > bfug.rtsp-youtube.l.google.com/CkYLENy73wIaPQkcSEPa1Fc6nRMYDSANFEIJbXYtZ29v > Z2xlSARSBWluZGV4Wg5DbGlja1RodW1ibmFpbGCqqamFtdjqsQkM/0/0/0/video.3gpcomp={c > om.android.music/com.android.music.MovieView}} > > W/SensorService( 50): could not enable sensor 2 > I/MediaPlayer-JNI( 189): prepareAsync: surface=0x1ae340 (id=1) > I/ActivityManager( 50): Displayed activity com.android.music/.MovieView: > 418 ms > D/dalvikvm( 166): GC freed 3935 objects / 290168 bytes in 75ms > E/MediaPlayer( 189): Error (-1,0) > D/VideoView( 189): Error: -1,0 > W/PlayerDriver( 25): PVMFInfoErrorHandlingComplete > > in the shell, > when i do "ps" command, > > "app_8 189 24 91620 13156 afe0c824 S > com.android.music:MovieView" is appearing. > > how the complete flow works? > who is responsible for launching the video stream, is MovieView consists of > MediaPlayer and VideoView. > > is any format changes in m.youtube.com video, any way to clearly see the > Error(-1,0) means. > > Thanks and Regards, > HarishKumar.V > > On Fri, Jan 30, 2009 at 8:15 PM, kolby wrote: > > > Here is the sample code to launch the view intent: > > > Uri uri = Uri.parse(url); > > // check if others handle this url > > Intent intent = new Intent(Intent.ACTION_VIEW, uri); > > intent.addCategory(Intent.CATEGORY_BROWSABLE); > > try { > > if (startActivityIfNeeded(intent, -1)) { > > // success > > } > > } catch (ActivityNotFoundException ex) { > > // fail > > } > > > The rtsp link doesn't seem to be recognized by anything on the > > emulator. > > > Michael --~--~-~--~~~---~--~~ 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: Does anyone know if there is new firmware for ADP1?
sorry for the typo on the title. but I cannot edit the post I created On Feb 10, 3:46 pm, monkeypipi wrote: > I searched the web and only found the latest firmware version for ADP1 > should be the 1.1. But it's not the rc33 and lack some new features > as Latitude. As a dev phone, ADP1 should have more advanced features > than normal G1 firmware, isn't it? Or can I check out the latest > source and build the firmware myself. If it is possible then how? > Thank you very much in advance for any clue. --~--~-~--~~~---~--~~ 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] Dose anyone know if there is new firmware for ADP1?
I searched the web and only found the latest firmware version for ADP1 should be the 1.1. But it's not the rc33 and lack some new features as Latitude. As a dev phone, ADP1 should have more advanced features than normal G1 firmware, isn't it? Or can I check out the latest source and build the firmware myself. If it is possible then how? Thank you very much in advance for any clue. --~--~-~--~~~---~--~~ 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] hi cant download
Hi all,I cant download the android books. Please help me. Thanks Mukesh. --~--~-~--~~~---~--~~ 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: Radio Off
On Mon, Feb 9, 2009 at 4:44 AM, Stanley.lei wrote: > > I also met this issue. > > I have tried to use the System.putInt > (RadioSetting.this.getContentResolver(), System.AIRPLANE_MODE_ON, > state) to set the state of the AIRPLANE_MODE, but it has no effect. > > Does anyone have corresponding experience about this? > As I explained, this just persists the state across reboot, and you will not see the result unless you reboot. This is not the right API to make an immediate change to airplane mode. It is possible these API's are not in the public SDK yet - this should be easy to work out by looking at the Settings Application implementation in our codebase. > > Thanks, > > Stanley > > On Feb 9, 2:02 pm, Jin wrote: > > Does anyone know the API in the 1.0 or cupcake SDK that can turn off/ > > on radio orairplanemode? Thanks. > > > > On Feb 6, 1:26 am, Nick Pelly wrote: > > > > > Actually, android.provider.Settings is just used to persist the on/off > state > > > across reboot. It is not as useful as it looks. Changing these values > will > > > only have an effect on startup. > > > > > In the case of Bluetooth, there is no SDK API to immediately turn it > off/on > > > quite yet. > > > > > I am pretty sure there is an SDK API to turn WIFI and Telephony off/on, > i'll > > > leave the relevant teams to chip in, although i'm sure its not hard to > find > > > in the SDK docs. > > > > > Nick > > > > > On Thu, Feb 5, 2009 at 1:24 PM, Mark K wrote: > > > > > > You can use android.provider.Settings, see the SDK docs. > > > > > > Mark > > > > > > On Feb 4, 2:14 am, Kamal Hasan wrote: > > > > > Hi, > > > > > > > Programatically how to switch off Radio, bluetooth and wifi in > > > > > android ? > > > > > Can I enableairplanemode? > > > > > > > Kamal- Hide quoted text - > > > > > - Show quoted text - > > > > > > > --~--~-~--~~~---~--~~ 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: access to internal telephony
Hi, Can you share the code snippet you use to call, for example - "212333,4;444" ? (the comma should yield a "timed" pause, the ';' - a "hard" pause - waiting for the user to acknowledge before dialing) Thanks ! On Feb 9, 1:19 pm, legerb wrote: > I had problems with the '#', but when encoded, it works fine. With > other symbols i didn't have any problems. And i remember that when '#' > was the last char (even encoded), it was always stripped. > > On Feb 9, 9:25 am, "shimo...@gmail.com" wrote: > > > Hi, > > > Using a DEV phone, seems I can not make calls to numbers containing > > extra digits (i.e. pauses - either 'hard' or 'timed'). They are > > stripped. > > > If I start the call from the built-in contacts app using the > > ACTION_VIEW > > intent and then tapping a phone field with, say - *151,#,1 it is > > dialed > > ok. > > > Is there any intent other than ACTION_CALL I need to use to start a > > call > > to a number like *151,#,1 to have the device call then send those > > extra digits ? > > > Or is there any specific intent data ? type ? extra ? > > Or maybe a formatting ? > > > TIA > > > On Feb 8, 6:09 am, Dianne Hackborn wrote: > > > > Not any time soon. Most of the classes there will only work when running > > > code in the phone process, and making them work in other process would be > > > significant work. > > > > Also on the G1 I don't believe that anything in the application processor > > > even has access the voice data stream, so it just wouldn't be able to do > > > what you want even if you were modifying the platform itself. > > > > On Sat, Feb 7, 2009 at 11:04 AM, Gero Mudersbach wrote: > > > > Hello, > > > > > are there plans to make com.android.internal.telephony available > > > > public? As > > > > far as I understand it is currently not possible to write e.g. an > > > > answering > > > > machine "within" the current framework (standard sdk), because direct > > > > access > > > > to "acceptCall" and hangup methods is missing. > > > > > Best > > > > G. Mudersbach > > > > -- > > > 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. 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] Re: Changing foreground or background color of title text of a Dialog
That did it. Thank you very much! On Mon, Feb 9, 2009 at 2:56 AM, Chander Pechetty wrote: > > You can also set the theme, in your style.xml > > >- @drawable/blue
>- #f0f0
> > > Then in your Dialog subclass use the constructor which takes a > theme.. > super(context, R.style.myCoolDialog); // to set themes for your > widgets > > > --~--~-~--~~~---~--~~ 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: Android SDK v1.1 due soon?
Cupcake is not RC33, it's a future version of Android. RC33 is something between 1.0 and Cupcake. On Mon, Feb 9, 2009 at 10:32 PM, Robert Green wrote: > > Is 1.1 SDK running the exact same codebase as RC33 or does RC33 have > more? I'm just confused as to where the cupcake branch lies in all of > this. I thought it went into RC33 and then I figured we'd have an SDK > which matched that, but this doesn't appear to be it. Anyone? > > On Feb 9, 4:28 pm, "Eric Wong (hdmp4.com)" > wrote: >> If you read the Android blog, 1.1 SDK is just released >> >> Cheers >> Eric >> >> On Feb 10, 4:48 am, monmonja wrote: >> >> > You can download it from google but just not on the download page. I >> > know its not there for a reason but if you really want to try 1.1 >> >> >http://almondmendoza.com/2009/02/09/android-sdk-11/ >> >> > I would suggest anyone to wait for the one on the download page coz >> > they might still change something or fix something. >> >> > On Feb 9, 9:34 pm, Wijnbo wrote: >> >> > > I already got the 1.1 SDK :-) >> >> > > On 9 feb, 12:25, Holkre wrote: >> >> > > > I myself would also be happy to see theSDK1.1, >> > > > im excited if WPA2 Enterprise has been addedtothe Wifi Controlls of >> > > > theSDK, >> > > > as it is an absolute must have when the Android Platform want´s to >> > > > become >> > > > readyfor the business market. >> >> > > > On Feb 9, 1:38 am, Ivan Soto wrote: >> >> > > > > I was sondering the same. >> >> > > > > It's not that my application won't work, but it would be nice to get >> > > > > theSDK >> > > > > updated. >> >> > > > > On Sun, Feb 8, 2009 at 3:17 PM, clark wrote: >> >> > > > > > I recently upgraded to RC33 on my G1 and when I uploaded an >> > > > > > application from within eclipse, I received a message warning that >> > > > > > the >> > > > > >SDKversion on the phone was1.1, which did not match theSDKversion >> > > > > > of 1.0 I am using. >> >> > > > > > I was wondering when the1.1SDKwill be available for developers. >> > > > > > I'm not noticing any issues, and I am not sure what, if any, new >> > > > > > functionality has been added to the1.1SDK. Just thought I'd ask. >> >> > > > > > Regards, >> > > > > > Scheff's Blend.- Tekst uit oorspronkelijk bericht niet weergeven - >> >> > > > - Tekst uit oorspronkelijk bericht weergeven - >> >> > > > -- 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] Re: Multimedia buffering
How to set darwin streaming server on windows ? from where i can download it for windows ? -AliBaba --~--~-~--~~~---~--~~ 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: Reg playing youtube video in android
Michael, using browser running in the android in emulator mode, i launched http://m.youtube.com. it opened up a page contaning list of video files. when i click any one of them, it starts to load video, but finally it fails with the message, "Sorry, this video cannot be played". using adb logcat, i got the log messages as, I/ActivityManager( 50): Starting activity: Intent { action=android.intent.action.VIEW categories={android.intent.category.BROWSABLE} data=rtsp:// bfug.rtsp-youtube.l.google.com/CkYLENy73wIaPQkcSEPa1Fc6nRMYDSANFEIJbXYtZ29vZ2xlSARSBWluZGV4Wg5DbGlja1RodW1ibmFpbGCqqamFtdjqsQkM/0/0/0/video.3gpcomp={com.android.music/com.android.music.MovieView} } W/SensorService( 50): could not enable sensor 2 I/MediaPlayer-JNI( 189): prepareAsync: surface=0x1ae340 (id=1) I/ActivityManager( 50): Displayed activity com.android.music/.MovieView: 418 ms D/dalvikvm( 166): GC freed 3935 objects / 290168 bytes in 75ms E/MediaPlayer( 189): Error (-1,0) D/VideoView( 189): Error: -1,0 W/PlayerDriver( 25): PVMFInfoErrorHandlingComplete in the shell, when i do "ps" command, "app_8189 2491620 13156 afe0c824 S com.android.music:MovieView" is appearing. how the complete flow works? who is responsible for launching the video stream, is MovieView consists of MediaPlayer and VideoView. is any format changes in m.youtube.com video, any way to clearly see the Error(-1,0) means. Thanks and Regards, HarishKumar.V On Fri, Jan 30, 2009 at 8:15 PM, kolby wrote: > > Here is the sample code to launch the view intent: > >Uri uri = Uri.parse(url); >// check if others handle this url >Intent intent = new Intent(Intent.ACTION_VIEW, uri); >intent.addCategory(Intent.CATEGORY_BROWSABLE); >try { > if (startActivityIfNeeded(intent, -1)) { > // success > } >} catch (ActivityNotFoundException ex) { > // fail >} > > The rtsp link doesn't seem to be recognized by anything on the > emulator. > > Michael > > > > --~--~-~--~~~---~--~~ 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: openGL normal mapping
Hi Patrik, It can be possible . like i have used some of GL11 apis like VBO . so give it a try . Just type cast it and use Regards, sUHAS On Tue, Feb 10, 2009 at 5:13 AM, Patrick wrote: > > Is it possible at this time to get normal mapping to work on android? > I'm asking because it would involve the use of GL_DOT3_RGB, which is > in the GL11 specs, not GL10. But GL11 is indicated as not completely > supported... > > Is there an official list of GL11 features that do not work, or is it > simply unstable and I should just avoid it for now? > > > > --~--~-~--~~~---~--~~ 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: Android SDK v1.1 due soon?
Is 1.1 SDK running the exact same codebase as RC33 or does RC33 have more? I'm just confused as to where the cupcake branch lies in all of this. I thought it went into RC33 and then I figured we'd have an SDK which matched that, but this doesn't appear to be it. Anyone? On Feb 9, 4:28 pm, "Eric Wong (hdmp4.com)" wrote: > If you read the Android blog, 1.1 SDK is just released > > Cheers > Eric > > On Feb 10, 4:48 am, monmonja wrote: > > > You can download it from google but just not on the download page. I > > know its not there for a reason but if you really want to try 1.1 > > >http://almondmendoza.com/2009/02/09/android-sdk-11/ > > > I would suggest anyone to wait for the one on the download page coz > > they might still change something or fix something. > > > On Feb 9, 9:34 pm, Wijnbo wrote: > > > > I already got the 1.1 SDK :-) > > > > On 9 feb, 12:25, Holkre wrote: > > > > > I myself would also be happy to see theSDK1.1, > > > > im excited if WPA2 Enterprise has been addedtothe Wifi Controlls of > > > > theSDK, > > > > as it is an absolute must have when the Android Platform want´s to > > > > become > > > > readyfor the business market. > > > > > On Feb 9, 1:38 am, Ivan Soto wrote: > > > > > > I was sondering the same. > > > > > > It's not that my application won't work, but it would be nice to get > > > > > theSDK > > > > > updated. > > > > > > On Sun, Feb 8, 2009 at 3:17 PM, clark wrote: > > > > > > > I recently upgraded to RC33 on my G1 and when I uploaded an > > > > > > application from within eclipse, I received a message warning that > > > > > > the > > > > > >SDKversion on the phone was1.1, which did not match theSDKversion > > > > > > of 1.0 I am using. > > > > > > > I was wondering when the1.1SDKwill be available for developers. > > > > > > I'm not noticing any issues, and I am not sure what, if any, new > > > > > > functionality has been added to the1.1SDK. Just thought I'd ask. > > > > > > > Regards, > > > > > > Scheff's Blend.- Tekst uit oorspronkelijk bericht niet weergeven - > > > > > - Tekst uit oorspronkelijk bericht weergeven - > > --~--~-~--~~~---~--~~ 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] Font height
Hi All, I have the TextView in my code, here i want to get the height of the text. So any one tell me how can i get it. Thanks in Advance, Muthu Kumar K. --~--~-~--~~~---~--~~ 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 launch the built-in picture viewer app from my app?
ok, thanks, I got the picture viewer to spawn but it doesn't display any new pictures since the viewer was run the first time. If I reset the phone (i.e. the picture viewer is forced to restart and rescan pictures) and launch the viewer again then the new pictures are displayed as expected (so this is a caching issue). Does anyone know how to force the picture viewer to rescan photos when it's being brought back to the front view? Some sort of Intent flag maybe? Thanks. On Feb 9, 12:25 pm, Mateo Aeon Ortega wrote: > The Activity I think you are looking for is: > com.android.camera.ImageGallery2 > > On Feb 9, 12:09 pm, Freddy wrote: > > > > > I don't want to re-invent the wheel and would like to use the existing > > android picture viewer. I've found some intents to launch built-in > > android app such as the dialer > > > Intent intent = new Intent(Intent.ACTION_MAIN); > > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > > intent.setClassName(this, > > "com.android.phone.Dialer"); > > startActivity(intent); > > > but have not found one for launching the picture viewer. How do I > > launch the android built-in picture viewer app? > > > Thanks!- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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: Failed to execute the Launcher built by myself
I noticed a discussion about the SlidingDrawer here: http://groups.google.com/group/android-developers/browse_thread/thread/5d735511a2de5137/bb4c622678f39322?hl=en&lnk=gst&q=com.android.internal#bb4c622678f39322 What can I do if the SlidingDrawer is a private API? Thanks Gerald On Feb 10, 11:03 am, Gerald wrote: > Attach exception message: > Unable to start activity ComponentInfo{com.android.mylauncher/ > com.android.mylauncher.Launcher}: android.view.InflateException: > Binary XML file line #40: Error inflating class > java.lang.reflect.Constructor > > The 40 line of my launcher.xml is the start tag of > com.android.internal.widget.SlidingDrawer > > On Feb 10, 10:53 am, Gerald wrote: > > > Attach log from logcat: > > - pid 403 at 2009-02-10 02:40:11 - > > Cmd line: com.android.mylauncher > > > DALVIK THREADS: > > "main" prio=5 tid=3 NATIVE > > | group="main" sCount=1 dsCount=0 s=0 obj=0x40018dd8 > > | sysTid=403 nice=0 sched=0/0 handle=-1096160100 > > at android.os.BinderProxy.transact(Native Method) > > at android.app.ActivityManagerProxy.handleApplicationError > > (ActivityManagerNative.java:2044) > > at com.android.internal.os.RuntimeInit.crash(RuntimeInit.java:302) > > at com.android.internal.os.RuntimeInit > > $UncaughtHandler.uncaughtException(RuntimeInit.java:75) > > at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:887) > > at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:884) > > at dalvik.system.NativeStart.main(Native Method) > > > "Binder Thread #2" prio=5 tid=13 NATIVE > > | group="main" sCount=1 dsCount=0 s=0 obj=0x4346c490 > > | sysTid=408 nice=0 sched=0/0 handle=809568 > > at dalvik.system.NativeStart.run(Native Method) > > > "Binder Thread #1" prio=5 tid=11 NATIVE > > | group="main" sCount=1 dsCount=0 s=0 obj=0x4346be60 > > | sysTid=407 nice=0 sched=0/0 handle=812328 > > at dalvik.system.NativeStart.run(Native Method) > > > "JDWP" daemon prio=5 tid=9 VMWAIT > > | group="system" sCount=1 dsCount=0 s=0 obj=0x4346b2a0 > > | sysTid=406 nice=0 sched=0/0 handle=804536 > > at dalvik.system.NativeStart.run(Native Method) > > > "Signal Catcher" daemon prio=5 tid=7 RUNNABLE > > | group="system" sCount=0 dsCount=0 s=0 obj=0x4346b1e8 > > | sysTid=405 nice=0 sched=0/0 handle=806024 > > at dalvik.system.NativeStart.run(Native Method) > > > "HeapWorker" daemon prio=5 tid=5 VMWAIT > > | group="system" sCount=1 dsCount=0 s=0 obj=0x425bf020 > > | sysTid=404 nice=0 sched=0/0 handle=823080 > > at dalvik.system.NativeStart.run(Native Method) > > > - end 403 - > > > This exception is thrown after setContentView(R.layout.launcher) in > > onCreate function in Launcher.java > > Thanks > > > Gerald > > > On Feb 10, 12:29 am, Romain Guy wrote: > > > > Without showing us the exact exception we won't be able to help you > > > much... > > > > On Mon, Feb 9, 2009 at 4:44 AM, Gerald wrote: > > > > > Hi, > > > > I need to customize the launcher application. > > > > I built it from the android source, and installed it to the emulator > > > > successfully(By renaming its package name to solve signing conflicts). > > > > When I tried to run my build, an exception occurred, and I can't find > > > > where it actually from because it seems to be from an internal thread. > > > > > After an whole day trying, I found that the exception is thrown by the > > > > line in Launcher.java possibly: > > > > setContentView(R.layout.launcher); > > > > > Does anyone have any suggestion? > > > > Thank you very much. > > > > > Gerald > > > > -- > > > 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] some question about "Pictures"
Hi all: I have some questions about AP-"Pictures". 1.Android support jpg, png and gif file formate. Can "Pictures" show *.gif file? I put some gif file in /sdcard, but those files do not in the list. 2."Pictures" will auto list still images(jpg , png) in /sdcard, can it show still image from internet? if yes, how? thanks!! --~--~-~--~~~---~--~~ 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 add the superscript affect to the string?
Hi frnds, I would like to write m2 (m to the power of 2, 2 should be on top of m in lower case). Can any one please tell me how to do this? Thanks, Manoj. --~--~-~--~~~---~--~~ 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: service permissions problem
Solution found ... On Tue, Feb 10, 2009 at 12:13 PM, flatmax wrote: > Hello, > > I have a service which uses the RECORD_AUDIO permission. > > I have set up my androidmanifest.xml file as I would expect to enable > that permissions (it is included below) > > For some reason when I start the service - from the service controller > - I get the following problem : > W/ServiceManager( 33): Permission failure: > android.permission.RECORD_AUDIO from uid=10024 pid=1887 > E/AudioFlinger( 33): Request requires > android.permission.RECORD_AUDIO > E/AudioRecord( 1887): AudioFlinger could not create record track, > status: -1 > > then the service dies ! > > here is my android manifest file : > > android:name="android.permission.RECORD_AUDIO" /> > > >android:name="android.permission.RECORD_AUDIO" /> > > > android:label="@string/activity_nalslm_service_controller"> > > android:name="android.permission.RECORD_AUDIO" /> > > android:name="android.intent.category.LAUNCHER" /> > > > > android:label="@string/activity_nalslm_service_binding"> > > android:name="android.permission.RECORD_AUDIO" /> > > android:name="android.intent.category.SAMPLE_CODE" /> > > > > android:label="@string/app_name"> > > android:name="android.permission.RECORD_AUDIO" /> > > android:name="android.intent.category.LAUNCHER" /> > > > -- http://www.flatmaxstudios.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] regarding running jni over android
hi ,i have some doubts about android.we have a mpeg 4 player in linux which is completly written in c. i want toport it into android, but android supports java applications.can we write ashared library in linux(.so)which include all api's and use them from java frontend.if it is possiblehow to do this one.pls send me if u have any sample code written in jni forandroid.Thanks And RegardsGururajDear androiddevelopers! Get Yourself a cool, short @in.com Email ID now! --~--~-~--~~~---~--~~ 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: Android SDK v1.1 - changes / bug fixes or lack of
On Tue, Feb 10, 2009 at 08:00, Mark Murphy wrote: > http://developer.android.com/sdk/1.1_r1/index.html The new website doesn't display correctly on the Android browser - it doesn't allow vertical scrolling. Joel --~--~-~--~~~---~--~~ 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: Voice Recognition like in Voice Search? (STT)
The package android.speech.srec is in the master SDK. It's documented as a simple, synchronous SREC speech recognition API. --~--~-~--~~~---~--~~ 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] service permissions problem
Hello, I have a service which uses the RECORD_AUDIO permission. I have set up my androidmanifest.xml file as I would expect to enable that permissions (it is included below) For some reason when I start the service - from the service controller - I get the following problem : W/ServiceManager( 33): Permission failure: android.permission.RECORD_AUDIO from uid=10024 pid=1887 E/AudioFlinger( 33): Request requires android.permission.RECORD_AUDIO E/AudioRecord( 1887): AudioFlinger could not create record track, status: -1 then the service dies ! here is my android manifest file : --~--~-~--~~~---~--~~ 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] 3gpp files
I have a video file in 3gpp format and I can use QuickTime to play it. But when tried with the SDK Windows emulator, I got the error msg: [2009-02-09 14:46:23 - DeviceMonitor]Error reading jdwp list: EOF [2009-02-09 14:46:23 - DeviceMonitor]Connection Failure when starting to monitor device 'emulator-5554' : device (emulator-5554) request rejected: device not found Any ideas?? -KC --~--~-~--~~~---~--~~ 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] Playing 3gpp content
Hi, I wonder if the Windows Emulator working under Eclipse can play 3gpp content file. My program tried to play it and got the error below. [2009-02-09 18:06:36 - DeviceMonitor]Error reading jdwp list: EOF [2009-02-09 18:06:36 - DeviceMonitor]Connection Failure when starting to monitor device 'emulator-5554' : device (emulator-5554) request rejected: device not found --~--~-~--~~~---~--~~ 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's in raw data from PictureCallback of camera?
Hi, Our university is intending to use the Android as a platform for mobile image analysis. We're wondering what kind of information is returned in the raw format when android.hardware.Camera.takePicture() is called with a raw Camera.PictureCallback. I can't seem to find more information about it on the http://code.google.com/android/reference/android/hardware/Camera.PictureCallback.html page. Thanks, Xiao --~--~-~--~~~---~--~~ 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] Detecting Ad Hoc Wifi access points
Hi, I am developing an application on the android platform. The app performs continues WiFi scan and sends information about the list of visible access points to server. However, I need to remove all the Ad Hoc points. The android.net.wifi.ScanResult api does not seem to have any information on "mode" of the network. Is there anyway I can distinguish a given point is Ad Hoc or Master? Thank you, Susahosh --~--~-~--~~~---~--~~ 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] Customization on SearchDialog
Hi Android folks, We currently want to customize the default Android search dialog UI to have our own look&feel. After looking into Android source code, we found out that two things of Android preventing us from doing it. 1. SearchManager declares an instance of SearchDialog as one of its private fields 2. SearchDialog is not compiled into the SDK. We are using 1.0R2. As for problem 1, we actually could work it around by reflection. The following is our code snippet to expose the private search dialog field of SearchManager SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE); try { Class searchManagerClass = searchManager.getClass(); Field searchDialogField = searchManagerClass.getDeclaredField("mSearchDialog"); searchDialogField.setAccessible (true); searchDialogField.set (searchManager, new OurCustomSearchDialog(context)); } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchFieldException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } However, when the code comes to the line searchDialogField.set(searchManager, new OurCustomSearchDialog (context));, it brings up the second problem. Because SearchDialog is not in the SDK, we have no way to create our custom search dialog by subclassing it. Then the line is actually not possible. Since the approach above cannot achieve our goal, I wonder if any of you guys happen to know how to customize the default Android search dialog, or at least why Google takes measures like that to protect SearchDialog from being customized. Thanks! --~--~-~--~~~---~--~~ 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 know the mac address of the device?
Hello frnds, I would like to the mac address of the device programmatically. Can any one please help me how to get it programmatically? thanks, Manoj. --~--~-~--~~~---~--~~ 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] G1 device is slow
applications on my G1 device are very slow when GPS is ON. is there any solution for this. all the applications responds with force close messsage. Regards, RockingTeam --~--~-~--~~~---~--~~ 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] Market numbers are weird the last few days
Starting this past weekend, all of a sudden the Android Market numbers for new Active Users has dropped VERY sharply for my app while the new downloads are higher than usual. (This is usually a symptom of large numbers of existing users re-downloading and re-installing the app) The user comments are positive as ever, the rating remains high at 4 stars, and emails to me the developer also remain positive. I have retested my app on RC33 and it works fine. I'm confused, and of course the way the Market and Google support works, helpless. I am suspecting that with the new Android Update RC33 something has changed with the way these download and new user numbers are captured, calculated or reported. Anyone else experiencing anything similar? thx Jay --~--~-~--~~~---~--~~ 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: Hi
Welcome On Feb 9, 10:10 am, Dilli wrote: > New join --~--~-~--~~~---~--~~ 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 going in back/previous activity
Hi, I am developing simple application. I have one activity which displays list of name of employees. I m fetching the employees name from database. when i click on any of the name ,i will display the next page showing details of that employee. also fetching details of employee from the database. It is working perfectly. but when i press back button of android phone to go back to the list ,i m facing an error. how can i go back to the list? please help me!! --~--~-~--~~~---~--~~ 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: Views
> 1) Does Google think there will only be one screen size on Android > phones? No. > The reason I ask is because I haven't been able to find > anything on "variable" layouts in Android? All layouts are variable. > I would like to create a > layout with 2 webviews, one 80% of screen height and the other 20%. > Is this even possible, or do I need to assign the height of each as a > static "px" value? That's what wrap_content, fill_parent, weight and in some measure the dip unit are for. > 2) How do I preserve the data in my views when someone switches > between landscape and portrait? I doubt it's hard, but I've not been > able to find it. Can someone post an example? It's done automatically for all the views with an id. -- 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] Re: Communicating with a Looper thread
Ahh yes, I was confused there for a sec cause I had no way of figuring out whether the thread was started or not. I think this should do the trick. Thanks again! On Feb 9, 6:51 pm, Dianne Hackborn wrote: > Oh I missed that you are writing your own special Thread. You probably > shouldn't use Thread unless you know how to do regular Java synchronization, > which is what you need to do here. > > The framework has a HandlerThread class that does all of this for you. > > > > On Mon, Feb 9, 2009 at 6:30 PM, JS wrote: > > > Dianne, > > > But how do I get the handle? > > > My handle is created in run(). From the main thread of control, how > > do I know > > when run() finished creating my handle? > > > Thanks > > > On Feb 9, 6:18 pm, Dianne Hackborn wrote: > > > You don't need to know, as long as you can get the Handler you can post > > > messages to it and the thread will process them in order once it is > > running. > > > > On Mon, Feb 9, 2009 at 5:35 PM, JS wrote: > > > > > I need a message queue in my background thread, so I created a looper > > > > thread. > > > > > // Example 1: > > > > class LooperThread extends Thread { > > > > public Handler mHandler; > > > > > public void run() { > > > > Looper.prepare(); > > > > > mHandler = new Handler() { > > > > public void handleMessage(Message msg) { > > > > // process incoming messages here > > > > } > > > > }; > > > > > Looper.loop(); > > > > } > > > > } > > > > > In my main (UI) thread I do: > > > > > LooperThread workerThread = new LooperThread() > > > > workerThread.start() // starts initializing the thread > > > > > Now the question is how to communicate with it? I can have an > > > > accesser getHandle() that returns my handle so I can send messages to > > > > it. > > > > > The issue is that I have no idea when workerThread.start() has > > > > finishing run() on the thread (and thus initialized the Handler) so I > > > > have no deterministic way of sending/posting to it just yet. > > > > > Another words, I don't know when Looper.loop() starts running... > > > > > My goal is to enqueue a message into its MessageQueue immediately > > > > after Handle is created so it can start handling them. > > > > > What's the correct pattern here? > > > > > Thanks > > > > -- > > > 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. All such questions should be posted on public > > > forums, where I and others can see and answer them. > > -- > 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. 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 going back activity
Hi, I am developing simple application. I have one activity which displays list of name of employees. I m fetching the employees name from database. when i click on any of the name ,i will display the next page showing details of that employee. also fetching details of employee from the database. It is working perfectly. but when i press back button of android phone to go back to the list ,i m facing an error. how can i go back to the list? please help me!! --~--~-~--~~~---~--~~ 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 Preference Screen
Dear Christoph I got the non-null return from inner screen, just like you said, thanks a lot for your help! On Feb 10, 10:27 am, Christoph Studer wrote: > From the code > here:http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;... > it looks like mDialog is only valid when that particular (inner) > PreferenceScreen is shown, i.e. when you see the contents of that > PreferenceScreen. So it the return value of getDialog() is depending > on when exactly you call it. > > What is it exactly you want to achieve after accessing the dialog? > > On Tue, Feb 10, 2009 at 3:11 AM, robert wrote: > > > Dear Christoph > > Thanks for ur reply:) > > I've tried as you said and I got the concept of the structure.But > > there is still a problem when I use the getDialog() method. > > I found that the return of this method is null when using it in my > > program but not null when I use ddms to debug and check the mDialog, > > and the mDialog is just set null in onDismiss() method, but ddms can't > > go into this method at running time, so I'm not sure whether this > > mDialog is the reference of the inner PreferenceScreen and can we get > > it by getDialog(), this is the annotation of getDialog() : ' Used to > > get a handle to the dialog. This is useful for cases where we want to > > manipulate the dialog as we would with any other activity or view.' > > > On Feb 10, 9:53 am, Christoph Studer wrote: > >> When the PreferenceActivity encounters nested PreferenceScreens in the > >> hierarchy, it will add the inner PreferenceScreen as a list entry > >> (similar appearance as e.g. for a EditTextPreference) to the outer > >> PreferenceScreen. When the user clicks on this list entry, the > >> contents of the inner PreferenceScreen will be shown. > > >> If this explanation does not make sense to you, just open Settings on > >> your phone. You can imagine all the entries shown on that screen > >> ("Wireless controls", "Call settings" etc.) being inner > >> PreferenceScreens of the main PreferenceScreen. When you click on an > >> entry, the contents of that particular inner PreferenceScreen will be > >> shown. > > >> I think the "Dialog" refers to the new - automatically generated - > >> screen that is shown when you click on the list entry and drill down > >> into the inner PreferenceScreen. It doesn't really look like a dialog, > >> but that's probably what it is. (As an alternative, the inner > >> PreferenceScreen could specify an activity intent that is fired when > >> the user clicks on its list entry.) > > >> Christoph > > >> On Tue, Feb 10, 2009 at 2:00 AM, robert wrote: > > >> > Hi All: > >> > When I see the doc of Preference Screen, there is one paragraph > >> > about the sub-preference screen related to dialog, the doc is as > >> > follow: > >> > ---> When it appears inside another preference hierarchy, it is > >> > shown and serves as the gateway to another screen of > >> > preferences (either by showing another screen of preferences as a > >> > Dialog or via a Context.startActivity(android.content.Intent) from the > >> > Preference.getIntent()). The children of this PreferenceScreen are > >> > NOT shown in the screen that this PreferenceScreen is shown in. > >> > Instead, a separate screen will be shown when this preference is > >> > clicked. > >> > But in Android Api Demo, the Preference from code, I find nothing > >> > related to Dialog when using PreferenceScreen as the base element of > >> > preference, and I have no idea about 'showing another screen of > >> > preferences as a Dialog', what does it mean? Is there a pop-dialog > >> > when we click anywhere in Preference Screen? But the Preference Screen > >> > is invisible. So I wanna know if there is any suggestion about my > >> > question, and 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] Re: Question about Preference Screen
I just try to invoke the method and make sure their functions, so it's weird when I got null when invoked getDialog() I'll try as you said in inner screen later and post the result here. Thanks for your help! On Feb 10, 10:27 am, Christoph Studer wrote: > From the code > here:http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;... > it looks like mDialog is only valid when that particular (inner) > PreferenceScreen is shown, i.e. when you see the contents of that > PreferenceScreen. So it the return value of getDialog() is depending > on when exactly you call it. > > What is it exactly you want to achieve after accessing the dialog? > > On Tue, Feb 10, 2009 at 3:11 AM, robert wrote: > > > Dear Christoph > > Thanks for ur reply:) > > I've tried as you said and I got the concept of the structure.But > > there is still a problem when I use the getDialog() method. > > I found that the return of this method is null when using it in my > > program but not null when I use ddms to debug and check the mDialog, > > and the mDialog is just set null in onDismiss() method, but ddms can't > > go into this method at running time, so I'm not sure whether this > > mDialog is the reference of the inner PreferenceScreen and can we get > > it by getDialog(), this is the annotation of getDialog() : ' Used to > > get a handle to the dialog. This is useful for cases where we want to > > manipulate the dialog as we would with any other activity or view.' > > > On Feb 10, 9:53 am, Christoph Studer wrote: > >> When the PreferenceActivity encounters nested PreferenceScreens in the > >> hierarchy, it will add the inner PreferenceScreen as a list entry > >> (similar appearance as e.g. for a EditTextPreference) to the outer > >> PreferenceScreen. When the user clicks on this list entry, the > >> contents of the inner PreferenceScreen will be shown. > > >> If this explanation does not make sense to you, just open Settings on > >> your phone. You can imagine all the entries shown on that screen > >> ("Wireless controls", "Call settings" etc.) being inner > >> PreferenceScreens of the main PreferenceScreen. When you click on an > >> entry, the contents of that particular inner PreferenceScreen will be > >> shown. > > >> I think the "Dialog" refers to the new - automatically generated - > >> screen that is shown when you click on the list entry and drill down > >> into the inner PreferenceScreen. It doesn't really look like a dialog, > >> but that's probably what it is. (As an alternative, the inner > >> PreferenceScreen could specify an activity intent that is fired when > >> the user clicks on its list entry.) > > >> Christoph > > >> On Tue, Feb 10, 2009 at 2:00 AM, robert wrote: > > >> > Hi All: > >> > When I see the doc of Preference Screen, there is one paragraph > >> > about the sub-preference screen related to dialog, the doc is as > >> > follow: > >> > ---> When it appears inside another preference hierarchy, it is > >> > shown and serves as the gateway to another screen of > >> > preferences (either by showing another screen of preferences as a > >> > Dialog or via a Context.startActivity(android.content.Intent) from the > >> > Preference.getIntent()). The children of this PreferenceScreen are > >> > NOT shown in the screen that this PreferenceScreen is shown in. > >> > Instead, a separate screen will be shown when this preference is > >> > clicked. > >> > But in Android Api Demo, the Preference from code, I find nothing > >> > related to Dialog when using PreferenceScreen as the base element of > >> > preference, and I have no idea about 'showing another screen of > >> > preferences as a Dialog', what does it mean? Is there a pop-dialog > >> > when we click anywhere in Preference Screen? But the Preference Screen > >> > is invisible. So I wanna know if there is any suggestion about my > >> > question, and 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] Re: Failed to execute the Launcher built by myself
Attach exception message: Unable to start activity ComponentInfo{com.android.mylauncher/ com.android.mylauncher.Launcher}: android.view.InflateException: Binary XML file line #40: Error inflating class java.lang.reflect.Constructor The 40 line of my launcher.xml is the start tag of com.android.internal.widget.SlidingDrawer On Feb 10, 10:53 am, Gerald wrote: > Attach log from logcat: > - pid 403 at 2009-02-10 02:40:11 - > Cmd line: com.android.mylauncher > > DALVIK THREADS: > "main" prio=5 tid=3 NATIVE > | group="main" sCount=1 dsCount=0 s=0 obj=0x40018dd8 > | sysTid=403 nice=0 sched=0/0 handle=-1096160100 > at android.os.BinderProxy.transact(Native Method) > at android.app.ActivityManagerProxy.handleApplicationError > (ActivityManagerNative.java:2044) > at com.android.internal.os.RuntimeInit.crash(RuntimeInit.java:302) > at com.android.internal.os.RuntimeInit > $UncaughtHandler.uncaughtException(RuntimeInit.java:75) > at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:887) > at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:884) > at dalvik.system.NativeStart.main(Native Method) > > "Binder Thread #2" prio=5 tid=13 NATIVE > | group="main" sCount=1 dsCount=0 s=0 obj=0x4346c490 > | sysTid=408 nice=0 sched=0/0 handle=809568 > at dalvik.system.NativeStart.run(Native Method) > > "Binder Thread #1" prio=5 tid=11 NATIVE > | group="main" sCount=1 dsCount=0 s=0 obj=0x4346be60 > | sysTid=407 nice=0 sched=0/0 handle=812328 > at dalvik.system.NativeStart.run(Native Method) > > "JDWP" daemon prio=5 tid=9 VMWAIT > | group="system" sCount=1 dsCount=0 s=0 obj=0x4346b2a0 > | sysTid=406 nice=0 sched=0/0 handle=804536 > at dalvik.system.NativeStart.run(Native Method) > > "Signal Catcher" daemon prio=5 tid=7 RUNNABLE > | group="system" sCount=0 dsCount=0 s=0 obj=0x4346b1e8 > | sysTid=405 nice=0 sched=0/0 handle=806024 > at dalvik.system.NativeStart.run(Native Method) > > "HeapWorker" daemon prio=5 tid=5 VMWAIT > | group="system" sCount=1 dsCount=0 s=0 obj=0x425bf020 > | sysTid=404 nice=0 sched=0/0 handle=823080 > at dalvik.system.NativeStart.run(Native Method) > > - end 403 - > > This exception is thrown after setContentView(R.layout.launcher) in > onCreate function in Launcher.java > Thanks > > Gerald > > On Feb 10, 12:29 am, Romain Guy wrote: > > > Without showing us the exact exception we won't be able to help you much... > > > On Mon, Feb 9, 2009 at 4:44 AM, Gerald wrote: > > > > Hi, > > > I need to customize the launcher application. > > > I built it from the android source, and installed it to the emulator > > > successfully(By renaming its package name to solve signing conflicts). > > > When I tried to run my build, an exception occurred, and I can't find > > > where it actually from because it seems to be from an internal thread. > > > > After an whole day trying, I found that the exception is thrown by the > > > line in Launcher.java possibly: > > > setContentView(R.layout.launcher); > > > > Does anyone have any suggestion? > > > Thank you very much. > > > > Gerald > > > -- > > 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] Re: Failed to execute the Launcher built by myself
Attach log from logcat: - pid 403 at 2009-02-10 02:40:11 - Cmd line: com.android.mylauncher DALVIK THREADS: "main" prio=5 tid=3 NATIVE | group="main" sCount=1 dsCount=0 s=0 obj=0x40018dd8 | sysTid=403 nice=0 sched=0/0 handle=-1096160100 at android.os.BinderProxy.transact(Native Method) at android.app.ActivityManagerProxy.handleApplicationError (ActivityManagerNative.java:2044) at com.android.internal.os.RuntimeInit.crash(RuntimeInit.java:302) at com.android.internal.os.RuntimeInit $UncaughtHandler.uncaughtException(RuntimeInit.java:75) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:887) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:884) at dalvik.system.NativeStart.main(Native Method) "Binder Thread #2" prio=5 tid=13 NATIVE | group="main" sCount=1 dsCount=0 s=0 obj=0x4346c490 | sysTid=408 nice=0 sched=0/0 handle=809568 at dalvik.system.NativeStart.run(Native Method) "Binder Thread #1" prio=5 tid=11 NATIVE | group="main" sCount=1 dsCount=0 s=0 obj=0x4346be60 | sysTid=407 nice=0 sched=0/0 handle=812328 at dalvik.system.NativeStart.run(Native Method) "JDWP" daemon prio=5 tid=9 VMWAIT | group="system" sCount=1 dsCount=0 s=0 obj=0x4346b2a0 | sysTid=406 nice=0 sched=0/0 handle=804536 at dalvik.system.NativeStart.run(Native Method) "Signal Catcher" daemon prio=5 tid=7 RUNNABLE | group="system" sCount=0 dsCount=0 s=0 obj=0x4346b1e8 | sysTid=405 nice=0 sched=0/0 handle=806024 at dalvik.system.NativeStart.run(Native Method) "HeapWorker" daemon prio=5 tid=5 VMWAIT | group="system" sCount=1 dsCount=0 s=0 obj=0x425bf020 | sysTid=404 nice=0 sched=0/0 handle=823080 at dalvik.system.NativeStart.run(Native Method) - end 403 - This exception is thrown after setContentView(R.layout.launcher) in onCreate function in Launcher.java Thanks Gerald On Feb 10, 12:29 am, Romain Guy wrote: > Without showing us the exact exception we won't be able to help you much... > > > > On Mon, Feb 9, 2009 at 4:44 AM, Gerald wrote: > > > Hi, > > I need to customize the launcher application. > > I built it from the android source, and installed it to the emulator > > successfully(By renaming its package name to solve signing conflicts). > > When I tried to run my build, an exception occurred, and I can't find > > where it actually from because it seems to be from an internal thread. > > > After an whole day trying, I found that the exception is thrown by the > > line in Launcher.java possibly: > > setContentView(R.layout.launcher); > > > Does anyone have any suggestion? > > Thank you very much. > > > Gerald > > -- > 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] Re: Communicating with a Looper thread
Oh I missed that you are writing your own special Thread. You probably shouldn't use Thread unless you know how to do regular Java synchronization, which is what you need to do here. The framework has a HandlerThread class that does all of this for you. On Mon, Feb 9, 2009 at 6:30 PM, JS wrote: > > Dianne, > > But how do I get the handle? > > My handle is created in run(). From the main thread of control, how > do I know > when run() finished creating my handle? > > Thanks > > On Feb 9, 6:18 pm, Dianne Hackborn wrote: > > You don't need to know, as long as you can get the Handler you can post > > messages to it and the thread will process them in order once it is > running. > > > > > > > > On Mon, Feb 9, 2009 at 5:35 PM, JS wrote: > > > > > I need a message queue in my background thread, so I created a looper > > > thread. > > > > > // Example 1: > > > class LooperThread extends Thread { > > >public Handler mHandler; > > > > >public void run() { > > >Looper.prepare(); > > > > >mHandler = new Handler() { > > >public void handleMessage(Message msg) { > > >// process incoming messages here > > >} > > >}; > > > > >Looper.loop(); > > >} > > > } > > > > > In my main (UI) thread I do: > > > > > LooperThread workerThread = new LooperThread() > > > workerThread.start() // starts initializing the thread > > > > > Now the question is how to communicate with it? I can have an > > > accesser getHandle() that returns my handle so I can send messages to > > > it. > > > > > The issue is that I have no idea when workerThread.start() has > > > finishing run() on the thread (and thus initialized the Handler) so I > > > have no deterministic way of sending/posting to it just yet. > > > > > Another words, I don't know when Looper.loop() starts running... > > > > > My goal is to enqueue a message into its MessageQueue immediately > > > after Handle is created so it can start handling them. > > > > > What's the correct pattern here? > > > > > Thanks > > > > -- > > 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. All such questions should be posted on public > > forums, where I and others can see and answer them. > > > -- 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. 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] Views
I have a couple different questions: 1) Does Google think there will only be one screen size on Android phones? The reason I ask is because I haven't been able to find anything on "variable" layouts in Android? I would like to create a layout with 2 webviews, one 80% of screen height and the other 20%. Is this even possible, or do I need to assign the height of each as a static "px" value? 2) How do I preserve the data in my views when someone switches between landscape and portrait? I doubt it's hard, but I've not been able to find it. Can someone post an example? Thanks everyone! --~--~-~--~~~---~--~~ 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: Communicating with a Looper thread
Dianne, But how do I get the handle? My handle is created in run(). From the main thread of control, how do I know when run() finished creating my handle? Thanks On Feb 9, 6:18 pm, Dianne Hackborn wrote: > You don't need to know, as long as you can get the Handler you can post > messages to it and the thread will process them in order once it is running. > > > > On Mon, Feb 9, 2009 at 5:35 PM, JS wrote: > > > I need a message queue in my background thread, so I created a looper > > thread. > > > // Example 1: > > class LooperThread extends Thread { > > public Handler mHandler; > > > public void run() { > > Looper.prepare(); > > > mHandler = new Handler() { > > public void handleMessage(Message msg) { > > // process incoming messages here > > } > > }; > > > Looper.loop(); > > } > > } > > > In my main (UI) thread I do: > > > LooperThread workerThread = new LooperThread() > > workerThread.start() // starts initializing the thread > > > Now the question is how to communicate with it? I can have an > > accesser getHandle() that returns my handle so I can send messages to > > it. > > > The issue is that I have no idea when workerThread.start() has > > finishing run() on the thread (and thus initialized the Handler) so I > > have no deterministic way of sending/posting to it just yet. > > > Another words, I don't know when Looper.loop() starts running... > > > My goal is to enqueue a message into its MessageQueue immediately > > after Handle is created so it can start handling them. > > > What's the correct pattern here? > > > Thanks > > -- > 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. 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] openGL : Render to texture
Is it possible on Android to use the result of a render as a texture for the next render? To render, I need to call eglMakeCurrent and specify the surface to render to. No problem. I create the main user display surface using eglCreateWindowSurface, and create an additional render targets by using eglCreatePbufferSurface. I would then MakeCurrent for my RT surface, render my world, then MakeCurrent on the display surface, and render more stuff, using the RT surface as a texture. The problem is that I can't find any way to actually use the result of the render to the RT surface. I should be able to call eglBindTexImage, but the function does not exist. Thanks, Patrick. --~--~-~--~~~---~--~~ 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 Preference Screen
>From the code here: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/preference/PreferenceScreen.java;h=9929b963755e03609c37822b01fe101f3ce575a2;hb=HEAD it looks like mDialog is only valid when that particular (inner) PreferenceScreen is shown, i.e. when you see the contents of that PreferenceScreen. So it the return value of getDialog() is depending on when exactly you call it. What is it exactly you want to achieve after accessing the dialog? On Tue, Feb 10, 2009 at 3:11 AM, robert wrote: > > Dear Christoph > Thanks for ur reply:) > I've tried as you said and I got the concept of the structure.But > there is still a problem when I use the getDialog() method. > I found that the return of this method is null when using it in my > program but not null when I use ddms to debug and check the mDialog, > and the mDialog is just set null in onDismiss() method, but ddms can't > go into this method at running time, so I'm not sure whether this > mDialog is the reference of the inner PreferenceScreen and can we get > it by getDialog(), this is the annotation of getDialog() : ' Used to > get a handle to the dialog. This is useful for cases where we want to > manipulate the dialog as we would with any other activity or view.' > > On Feb 10, 9:53 am, Christoph Studer wrote: >> When the PreferenceActivity encounters nested PreferenceScreens in the >> hierarchy, it will add the inner PreferenceScreen as a list entry >> (similar appearance as e.g. for a EditTextPreference) to the outer >> PreferenceScreen. When the user clicks on this list entry, the >> contents of the inner PreferenceScreen will be shown. >> >> If this explanation does not make sense to you, just open Settings on >> your phone. You can imagine all the entries shown on that screen >> ("Wireless controls", "Call settings" etc.) being inner >> PreferenceScreens of the main PreferenceScreen. When you click on an >> entry, the contents of that particular inner PreferenceScreen will be >> shown. >> >> I think the "Dialog" refers to the new - automatically generated - >> screen that is shown when you click on the list entry and drill down >> into the inner PreferenceScreen. It doesn't really look like a dialog, >> but that's probably what it is. (As an alternative, the inner >> PreferenceScreen could specify an activity intent that is fired when >> the user clicks on its list entry.) >> >> Christoph >> >> On Tue, Feb 10, 2009 at 2:00 AM, robert wrote: >> >> > Hi All: >> >When I see the doc of Preference Screen, there is one paragraph >> > about the sub-preference screen related to dialog, the doc is as >> > follow: >> >---> When it appears inside another preference hierarchy, it is >> > shown and serves as the gateway to another screen of >> > preferences (either by showing another screen of preferences as a >> > Dialog or via a Context.startActivity(android.content.Intent) from the >> > Preference.getIntent()). The children of this PreferenceScreen are >> > NOT shown in the screen that this PreferenceScreen is shown in. >> > Instead, a separate screen will be shown when this preference is >> > clicked. >> > But in Android Api Demo, the Preference from code, I find nothing >> > related to Dialog when using PreferenceScreen as the base element of >> > preference, and I have no idea about 'showing another screen of >> > preferences as a Dialog', what does it mean? Is there a pop-dialog >> > when we click anywhere in Preference Screen? But the Preference Screen >> > is invisible. So I wanna know if there is any suggestion about my >> > question, and 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] Re: Touch screen response delay
I've finally nailed a semi-reproducible test case for this and have raised an issue: http://code.google.com/p/android/issues/detail?id=1956 This is a nasty bug - I think it's a showstopper for me in this application: I have too much state associated with touch events to avoid synchronization and the only workarounds I can think of involve lots of object creation. Tom. 2009/2/8 Tom Gibara > Hmm, > This sounds very similar to my situation. My game update loop takes the > lock just once, updates the game state (a relatively fast operation), > releases the lock and then performs rendering to a surface (a relatively > slow operation). The game currently executes the loop in about 50ms. The > amount of time that the lock is held by this update thread is significantly > less than 1ms per loop. > > Within the touch handler, the event thread contends for this lock on each > down touch event (ie. very infrequently). And yet (iirc from the last time I > investigated) it appeared that the event thread was indeed blocking on the > acquisition of my game state lock - long enough to trigger an ANR. At the > same time I can see the game continuing to run smoothly, so I know the the > lock must be being released many times a second! > > It has all the hallmarks of an issue in the way monitors are being handled > by the Java threads (I'm pretty sure the JLS requires fairness). BUT any > attempt to produce a test case that is significantly smaller and that > triggers the issue frequently enough has failed. So the jury is out, I could > well have a bug somewhere. > > I refuse to 'fix' this by removing the synchronization. I don't see why you > should need to. > > Note that the apparently easy fix of removing the synchronization block > will almost certainly introduce a bug into the code, even if the chances of > it being triggered are probably extremely low. > > Tom. > > 2009/2/8 Zombies and Robots > > >> I figured out what was causing my particular problem. Both the method >> that draws the SurfaceView and the method that handles the touch >> events were synchronized with the same object. I'm guessing the >> delays were caused because the touch event handler method couldn't >> access this object while the drawing method was running... which was >> just about all the time. To resolve the problem, all I had to do was >> remove the synchronization from the touch event handler method and >> modify my drawing method so that it accessed the camera's location >> only once (which I would have done in the first place had I been >> writing efficient code). >> >> I'm feeling pretty dumb for missing that... but thank you nonetheless >> for your helpful responses! They definitely got me thinking toward >> the solution. >> >> On Feb 6, 7:58 pm, Al wrote: >> > Hi, have you checked the trace file that is written when an anr >> > occurs? It shoud be in /data/anr with the filename traces.txt. This >> > will show exactly what was running and at what line of code when the >> > anr popped up and should help locate the problem code. >> > >> > On Feb 6, 7:03 pm, Zombies and Robots wrote: >> > >> > > Hello. >> > >> > > I am working on a game that displays its graphics through a modified >> > > SurfaceView. The game scrolls around a map based on the location of >> > > the main character. That all works fine. >> > >> > > I am trying to add a feature to the game that allows you to touch the >> > > screen and drag the camera around to see other parts of the map. This >> > > is where I am running into trouble. The game's SurfaceView overrides >> > > 'public boolean onTouchEvent(MotionEvent event)' to call another >> > > method in the game's thread which handles the events. Sometimes, this >> > > works fine (although the frame rate drops significantly while the >> > > screen is touched). Other times, there will be a delay of several >> > > seconds before the game responds to a touch event, during which time >> > > the game continues, but the user loses all control. During these >> > > delays, a message sometimes appears stating that my activity is not >> > > responding, and giving the options to 'Force close' or 'Wait'. If the >> > > user selects 'Wait', the game almost always resumes right away, but >> > > these delays are obviously not acceptable. >> > >> > > The delays occur only the first time the screen is touched after the >> > > game is started. Once the game has resumed after a delay, the touch >> > > events work just fine again. >> > >> > > I have experimented with having the game thread sleep for short >> > > periods at various points throughout the game. Although this does >> > > seem to have a small effect on the problem, the delays still happen. >> > > Has anyone else run into this? What am I doing wrong? >> > >> > > Thank you very much for any suggestions you can provide. >> >> >> > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Androi
[android-developers] Re: Communicating with a Looper thread
You don't need to know, as long as you can get the Handler you can post messages to it and the thread will process them in order once it is running. On Mon, Feb 9, 2009 at 5:35 PM, JS wrote: > > I need a message queue in my background thread, so I created a looper > thread. > > // Example 1: > class LooperThread extends Thread { >public Handler mHandler; > >public void run() { >Looper.prepare(); > >mHandler = new Handler() { >public void handleMessage(Message msg) { >// process incoming messages here >} >}; > >Looper.loop(); >} > } > > In my main (UI) thread I do: > > LooperThread workerThread = new LooperThread() > workerThread.start() // starts initializing the thread > > Now the question is how to communicate with it? I can have an > accesser getHandle() that returns my handle so I can send messages to > it. > > The issue is that I have no idea when workerThread.start() has > finishing run() on the thread (and thus initialized the Handler) so I > have no deterministic way of sending/posting to it just yet. > > Another words, I don't know when Looper.loop() starts running... > > My goal is to enqueue a message into its MessageQueue immediately > after Handle is created so it can start handling them. > > What's the correct pattern here? > > Thanks > > > -- 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. 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] Re: Question about Preference Screen
Dear Christoph Thanks for ur reply:) I've tried as you said and I got the concept of the structure.But there is still a problem when I use the getDialog() method. I found that the return of this method is null when using it in my program but not null when I use ddms to debug and check the mDialog, and the mDialog is just set null in onDismiss() method, but ddms can't go into this method at running time, so I'm not sure whether this mDialog is the reference of the inner PreferenceScreen and can we get it by getDialog(), this is the annotation of getDialog() : ' Used to get a handle to the dialog. This is useful for cases where we want to manipulate the dialog as we would with any other activity or view.' On Feb 10, 9:53 am, Christoph Studer wrote: > When the PreferenceActivity encounters nested PreferenceScreens in the > hierarchy, it will add the inner PreferenceScreen as a list entry > (similar appearance as e.g. for a EditTextPreference) to the outer > PreferenceScreen. When the user clicks on this list entry, the > contents of the inner PreferenceScreen will be shown. > > If this explanation does not make sense to you, just open Settings on > your phone. You can imagine all the entries shown on that screen > ("Wireless controls", "Call settings" etc.) being inner > PreferenceScreens of the main PreferenceScreen. When you click on an > entry, the contents of that particular inner PreferenceScreen will be > shown. > > I think the "Dialog" refers to the new - automatically generated - > screen that is shown when you click on the list entry and drill down > into the inner PreferenceScreen. It doesn't really look like a dialog, > but that's probably what it is. (As an alternative, the inner > PreferenceScreen could specify an activity intent that is fired when > the user clicks on its list entry.) > > Christoph > > On Tue, Feb 10, 2009 at 2:00 AM, robert wrote: > > > Hi All: > > When I see the doc of Preference Screen, there is one paragraph > > about the sub-preference screen related to dialog, the doc is as > > follow: > > ---> When it appears inside another preference hierarchy, it is > > shown and serves as the gateway to another screen of > > preferences (either by showing another screen of preferences as a > > Dialog or via a Context.startActivity(android.content.Intent) from the > > Preference.getIntent()). The children of this PreferenceScreen are > > NOT shown in the screen that this PreferenceScreen is shown in. > > Instead, a separate screen will be shown when this preference is > > clicked. > > But in Android Api Demo, the Preference from code, I find nothing > > related to Dialog when using PreferenceScreen as the base element of > > preference, and I have no idea about 'showing another screen of > > preferences as a Dialog', what does it mean? Is there a pop-dialog > > when we click anywhere in Preference Screen? But the Preference Screen > > is invisible. So I wanna know if there is any suggestion about my > > question, and 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] Re: Where is a system-image for DP1?
Jean, Thank you for your response. I'm looking forward install new system image to my phone. Regards, keiji Jean-Baptiste Queru wrote: > We're working on it. > > JBQ > > On Mon, Feb 9, 2009 at 4:48 PM, Keiji Ariyama wrote: >> Hi folks, >> >> I downloaded new Android SDK 1.1 release 1. But I cannot find new system >> image for Dev Phone 1. >> >> I thought that new system-image will be included in new SDK. >> >> Where is a system-image for DP1? >> >> -- >> Keiji, >> ml_andr...@c-lis.co.jp >> > > > -- Keiji, ml_andr...@c-lis.co.jp --~--~-~--~~~---~--~~ 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: Possible Bug in Dialog-Persistence (onCreateDialog / onPrepareDialog)
I just discovered the same issue, that when the screen orientation is changed, and the owner is recreated, any dialogs are recreated with onCreateDialog but onPrepareDialog does not appear to be called. The relevant sections of code can be found in Activity.java and Dialog.java. When the dialogs are being restored they are created through calls to onCreateDialog, but the dialog state is actually restored through Dialog.onRestoreInstanceState. To me, this design design does not mesh all that well with the existence of onPrepareDialog. In any case, it is possible to achieve the desired effect by overriding Dialog.onSaveInstanceState and Dialog.onRestoreInstanceState rather than relying on Activity.onPrepareDialog. This is made slightly more difficult since Dialog does not follow the normal Activity lifecycle, ie, there is no onResume called after onRestoreInstanceState, so many of the things that you would normally put in onResume must go into onRestoreInstanceState without interfering with the rest of your dialog. Hope that helps. On Feb 7, 11:15 pm, plusminus wrote: > Hi all, > > I'm not 100% sure whether this is a bugs, so I'm asking on here. > > Issue #1: > In my Acticity the user is passing trough some dialogs: > > D/OPENSTREETMAP( 1468): Creating dialog: 1 > D/OPENSTREETMAP( 1468): Preparing dialog: 1 > D/OPENSTREETMAP( 1468): Creating dialog: 0 > D/OPENSTREETMAP( 1468): Preparing dialog: 0 > D/OPENSTREETMAP( 1468): Creating dialog: 5 > D/OPENSTREETMAP( 1468): Preparing dialog: 5 > > >While a dialog is open<, the screenorientation is changed manually. > > // Change in ScreenOrientation > D/OPENSTREETMAP( 1468): Creating dialog: 0 > D/OPENSTREETMAP( 1468): Creating dialog: 1 > D/OPENSTREETMAP( 1468): Creating dialog: 5 > > The Bug is in my opinion that onPrepareDialog is not called after the > change of the Screenorientation. > I assume it would happen to the currently opened Dialog. > > Any suggestion is welcomed. > > Best Regards, > plusminus --~--~-~--~~~---~--~~ 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: Voice Recognition like in Voice Search? (STT)
You can find the doc for 1.1 on the new homepage: http://developer.android.com/reference/packages.html AFAIK voice recognition is not part of the SDK, at least it's not mentioned in the changes: http://developer.android.com/sdk/android-1.1.html#api-changes Christoph On Mon, Feb 9, 2009 at 2:26 PM, Markus Junginger wrote: > > Voice Search is new with RC33. I am wondering if the voice recognition > will be part of the API 1.1. Or at least an Intent? > > Btw, is the SDK 1.1 JavaDoc available somewhere yet? > > Regards, > Markus > > -- > http://jars.de > > > > --~--~-~--~~~---~--~~ 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 Preference Screen
When the PreferenceActivity encounters nested PreferenceScreens in the hierarchy, it will add the inner PreferenceScreen as a list entry (similar appearance as e.g. for a EditTextPreference) to the outer PreferenceScreen. When the user clicks on this list entry, the contents of the inner PreferenceScreen will be shown. If this explanation does not make sense to you, just open Settings on your phone. You can imagine all the entries shown on that screen ("Wireless controls", "Call settings" etc.) being inner PreferenceScreens of the main PreferenceScreen. When you click on an entry, the contents of that particular inner PreferenceScreen will be shown. I think the "Dialog" refers to the new - automatically generated - screen that is shown when you click on the list entry and drill down into the inner PreferenceScreen. It doesn't really look like a dialog, but that's probably what it is. (As an alternative, the inner PreferenceScreen could specify an activity intent that is fired when the user clicks on its list entry.) Christoph On Tue, Feb 10, 2009 at 2:00 AM, robert wrote: > > Hi All: >When I see the doc of Preference Screen, there is one paragraph > about the sub-preference screen related to dialog, the doc is as > follow: >---> When it appears inside another preference hierarchy, it is > shown and serves as the gateway to another screen of > preferences (either by showing another screen of preferences as a > Dialog or via a Context.startActivity(android.content.Intent) from the > Preference.getIntent()). The children of this PreferenceScreen are > NOT shown in the screen that this PreferenceScreen is shown in. > Instead, a separate screen will be shown when this preference is > clicked. > But in Android Api Demo, the Preference from code, I find nothing > related to Dialog when using PreferenceScreen as the base element of > preference, and I have no idea about 'showing another screen of > preferences as a Dialog', what does it mean? Is there a pop-dialog > when we click anywhere in Preference Screen? But the Preference Screen > is invisible. So I wanna know if there is any suggestion about my > question, and 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] Re: MMS message length
You can simply change it from String.xml file :-) 50 It is 500KB for now :-) However, some MMSCs do not accept a MMS bigger than 300KB~ So, you have to be careful to chnage it~ 2009/2/7 Ajith > > Is there an API to support setting MMS upload and download message > size ? Are there predefined sizes that limit how big the outgoing and > incoming messages can be ? > Ajith > > > > --~--~-~--~~~---~--~~ 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] Communicating with a Looper thread
I need a message queue in my background thread, so I created a looper thread. // Example 1: class LooperThread extends Thread { public Handler mHandler; public void run() { Looper.prepare(); mHandler = new Handler() { public void handleMessage(Message msg) { // process incoming messages here } }; Looper.loop(); } } In my main (UI) thread I do: LooperThread workerThread = new LooperThread() workerThread.start() // starts initializing the thread Now the question is how to communicate with it? I can have an accesser getHandle() that returns my handle so I can send messages to it. The issue is that I have no idea when workerThread.start() has finishing run() on the thread (and thus initialized the Handler) so I have no deterministic way of sending/posting to it just yet. Another words, I don't know when Looper.loop() starts running... My goal is to enqueue a message into its MessageQueue immediately after Handle is created so it can start handling them. What's the correct pattern here? Thanks --~--~-~--~~~---~--~~ 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: MMS message length
You can simply change it from String.xml file :-) 50 It is 500KB for now :-) However, some MMSCs do not accept a MMS bigger than 300KB~ So, you have to be careful to chnage it~ 2009/2/7 Ajith > > Is there an API to support setting MMS upload and download message > size ? Are there predefined sizes that limit how big the outgoing and > incoming messages can be ? > Ajith > > > > --~--~-~--~~~---~--~~ 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: DEFAULT_ALL crashes app
Ok, I found the problem and it is simple... I needed vibrate permission in the manifest! Am I really the only noob making this mistake though... Anyway, just add: inside the manifest tag (same level as ) and you are golden. On Feb 9, 4:11 pm, Dianne Hackborn wrote: > At the very least you should post a stack crawl. > > > > On Mon, Feb 9, 2009 at 4:01 PM, 3D wrote: > > > Has anyone else experienced this? It crashes both on the emulator and > > my G1. > > > On Feb 9, 1:13 am, 3D wrote: > > > I've been using: > > > > Notification.DEFAULT_SOUND > > > > for quite some time with great success. When I replace that with: > > > > Notification.DEFAULT_ALL > > > > the program crashes when the notification is called. What's up with > > > that? > > -- > 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. 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] Re: access to class not allowed
I am sure that is the problem. I hacked the dalvik and uncommented the line to check if the class is public. And then the application can be launched. So thank you very much for the hints. On Feb 10, 5:34 am, fadden wrote: > On Feb 7, 1:09 am, johnny wrote: > > > So from which version, rc1, 1.0 or cupcake, the bug in Dalvik is > > fixed? Just want to make it easier when communicating with the author > > of the apk file. > > I don't remember precisely. Since I'm not sure this is the problem > you're experiencing, it would probably be best to send the author some > information about what version of the platform you're running, along > with a healthy snippet from the log file. --~--~-~--~~~---~--~~ 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 Preference Screen
Hi All: When I see the doc of Preference Screen, there is one paragraph about the sub-preference screen related to dialog, the doc is as follow: ---> When it appears inside another preference hierarchy, it is shown and serves as the gateway to another screen of preferences (either by showing another screen of preferences as a Dialog or via a Context.startActivity(android.content.Intent) from the Preference.getIntent()). The children of this PreferenceScreen are NOT shown in the screen that this PreferenceScreen is shown in. Instead, a separate screen will be shown when this preference is clicked. But in Android Api Demo, the Preference from code, I find nothing related to Dialog when using PreferenceScreen as the base element of preference, and I have no idea about 'showing another screen of preferences as a Dialog', what does it mean? Is there a pop-dialog when we click anywhere in Preference Screen? But the Preference Screen is invisible. So I wanna know if there is any suggestion about my question, and 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] Re: Where is a system-image for DP1?
We're working on it. JBQ On Mon, Feb 9, 2009 at 4:48 PM, Keiji Ariyama wrote: > > Hi folks, > > I downloaded new Android SDK 1.1 release 1. But I cannot find new system > image for Dev Phone 1. > > I thought that new system-image will be included in new SDK. > > Where is a system-image for DP1? > > -- > Keiji, > ml_andr...@c-lis.co.jp > > > > -- Jean-Baptiste M. "JBQ" Queru Android Engineer, Google. --~--~-~--~~~---~--~~ 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] Where is a system-image for DP1?
Hi folks, I downloaded new Android SDK 1.1 release 1. But I cannot find new system image for Dev Phone 1. I thought that new system-image will be included in new SDK. Where is a system-image for DP1? -- Keiji, ml_andr...@c-lis.co.jp --~--~-~--~~~---~--~~ 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: DEFAULT_ALL crashes app
At the very least you should post a stack crawl. On Mon, Feb 9, 2009 at 4:01 PM, 3D wrote: > > Has anyone else experienced this? It crashes both on the emulator and > my G1. > > > On Feb 9, 1:13 am, 3D wrote: > > I've been using: > > > > Notification.DEFAULT_SOUND > > > > for quite some time with great success. When I replace that with: > > > > Notification.DEFAULT_ALL > > > > the program crashes when the notification is called. What's up with > > that? > > > -- 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. 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] Re: DEFAULT_ALL crashes app
Has anyone else experienced this? It crashes both on the emulator and my G1. On Feb 9, 1:13 am, 3D wrote: > I've been using: > > Notification.DEFAULT_SOUND > > for quite some time with great success. When I replace that with: > > Notification.DEFAULT_ALL > > the program crashes when the notification is called. What's up with > 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 -~--~~~~--~~--~--~---
[android-developers] Re: Sub Activities in Tabs?
Sorry, this really isn't supported. Activities inside of tabs is currently a really special-cased thing, with very limited features. On Mon, Feb 9, 2009 at 8:10 AM, kilobike wrote: > > Hi All, > > I have a tabbed applicationen setup. I like to keep the tabs visible > at all times and work with its subactivites as 'more or less' > standalone application threads. > > Within one or more of these tab subactivities, I'd like to start its > own sub-activity, which should not hide the root tabs. > > Whatever I've found will call ctx.startActivity() which works, but > will hide the tabs by using the full screen. > > Is there a way to limit the sub actitivies to a parent activities > bounds, and keep (in my case) the rot Tabs visible? > Where shall I look? > > Cheers! > > > > -- 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. 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] openGL normal mapping
Is it possible at this time to get normal mapping to work on android? I'm asking because it would involve the use of GL_DOT3_RGB, which is in the GL11 specs, not GL10. But GL11 is indicated as not completely supported... Is there an official list of GL11 features that do not work, or is it simply unstable and I should just avoid it for now? --~--~-~--~~~---~--~~ 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: Repeating alarms with AlarmManager and daylight saving / leap years
Yes, just schedule a new alarm each time with the exact time you want if it is critical for you. On Mon, Feb 9, 2009 at 2:25 PM, lorenz wrote: > > Hey > > I'm looking for a way to trigger repeated actions. I'd like the user > to be able to choose the intervals at which these actions will be > executed. One should be able to choose from intervals like "Every > Day", "Every Month", and "Every Year". The setRepeating(int, long, > long, PendingIntent) method of the android.app.AlarmManager class only > supports a long value for choosing the interval between the execution > of the pending intent. My problem now is, that I can not just compute > the number of milliseconds that "fit into one day", since not all days > have the same length (daylight saving). This is also a problem for the > interval type "year" (leap years). > > I had a quick look at the android.os.Handler class, but as I > understood the documentation I'd need to keep a service thread running > for my actions to be executed at some future time. I don't consider > that a good option for my needs ;-) > > Is there anything in the API I could configure with a cron expression > or the like? > > I was also thinking about scheduling an alarm with the AlarmManager > for a single execution at a given date/time and then having a receiver > that does the rescheduling according to a cron expression attached to > the intent. But I don't know if I just got something completely wrong > here and I'm reinventing the wheel with that approach :-/ > > Any advice or pointers would be greatly appreciated :-) > > Cheers > Lorenz > > > > -- 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. 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] Re: Will the addPreferredActivity method available in the future?
You don't get to do that. The user gets to decide which activities they prefer. This is the last time I am answering this question. On Mon, Feb 9, 2009 at 9:35 AM, Sei wrote: > > All, > > Per this thread, > http://groups.google.com/group/android-developers/msg/79752885135cc87b, > I know that addPackageToPreferred is going away in the future. Can > the Googlers comment on the addPreferredActivity under the > android.content.pm.PackageManager package? If both methods are going > away, are you plan to replace this feature by the way of broadcasting > intent? > > I have listed my use case below. Maybe you can provide me an > alternative way other than using the addPreferredActivity? > > Use Case 1 > > 1. A user installs and runs the application > 2. The activity has detected that this application is running for the > first time, and offered the user to use this application as the > default activity > > Thanks in advance, > Sei > > > > -- 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. 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] Re: How ACTION_CHOOSER picks choices for ACTION_SET_WALLPAPER
I'm not sure I understand your question. When you use ACTION_CHOOSER, you are bringing up a dialog showing all of the activities that have an intent-filter matching the Intent you have supplied. When the user selects one of those, it simply launches the Intent you originally specified with the component set to the explicit component of the activity the user picked. There are no other Intents involved. On Mon, Feb 9, 2009 at 3:00 PM, Rohit wrote: > > I have the same question. What intent/action is used to show the > Wallpaper chooser after the initial ACTION_CHOOSER to show the > possible choices for setting the wallpaper from? > > Thanks > Rohit > > On Feb 2, 3:23 pm, Layeeq wrote: > > In Launcher application, ACTION_CHOOSER intent is used to show > > possible choices for settingwallpaperfrom. I could not find > > ACTION_SET_WALLPAPER in any AndroidManifest.xml. What ACTION does it > > use to identify the possible choices (gallery, wallpaper)? Is this > > PICK_ACTION? > > > > Thanks, Layeeq > > > -- 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. 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] Re: How ACTION_CHOOSER picks choices for ACTION_SET_WALLPAPER
I have the same question. What intent/action is used to show the Wallpaper chooser after the initial ACTION_CHOOSER to show the possible choices for setting the wallpaper from? Thanks Rohit On Feb 2, 3:23 pm, Layeeq wrote: > In Launcher application, ACTION_CHOOSER intent is used to show > possible choices for settingwallpaperfrom. I could not find > ACTION_SET_WALLPAPER in any AndroidManifest.xml. What ACTION does it > use to identify the possible choices (gallery, wallpaper)? Is this > PICK_ACTION? > > Thanks, Layeeq --~--~-~--~~~---~--~~ 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: Android SDK v1.1 - changes / bug fixes or lack of
Right! I missed that, thank you for the clarification. The bug mentioned has been raised source.android.com. On Feb 10, 11:36 am, "Justin (Google Employee)" wrote: > If you find *new* bugs the right thing to do is file > them,http://source.android.com/report-bugs. Remember to search for > existing bugs that match your issues before filing new ones. > > To echo Dianne, 1.1 was not a major platform release and many of the > bugs in 1.0 will still exist in 1.1. > > Cheers, > Justin > Android Team @ Google > > On Feb 9, 2:15 pm, Dianne Hackborn wrote: > > > The 1.1 update was not a major platform release, it was primarily for > > localization, and we deliberately avoided doing other things to keep it as > > small as possible. I really don't want to read everything about 1.1 that is > > no different from 1.0 and people are for some reason unhappy about. :p > > > On Mon, Feb 9, 2009 at 1:19 PM, thesquib wrote: > > > > This thread is for reporting changes and bug fixes (or the lack of > > > fixes) to the new 1.1 SDK. > > > > So far I have found: > > > > Bug: android.graphics.Bitmap.getPixels and > > > android.graphics.Bitmap.getPixel still do not correctly function > > > (information is lost). > > > > Feature missing: Playing sounds from input streams is not available. > > > This is very useful when playing from a single resource that contains > > > multiple sounds. > > > > Documentation is still a bit thin. It is very hard to know how to > > > write an optimised application, especially when using the 2D graphics > > > API's which have very little explained. > > > > Thanks, > > > Sam > > > -- > > 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. 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] Re: ImageView.setColorFilter and/or LightingColorFilter- how to use them?
It looks like the int values can range from -255 to 255. I was mislead, the docs has a range of values of 0 to 255. On Feb 9, 5:06 pm, myIP wrote: > How would I be able to adjust a channel (R,G or B) using > ImageView.setColorFilter by passing an instance of LightingColorFilter > in its construct? > > For an example, when I create an instance of LightingColorFilter, I > adjust the two params that are int values between 0-255. With this > instance, I then pass it into setColorFilter. The image always ends > up anywhere from being black to blue. How can I adjust the Red or > Green channel? > > LightingColorFilter lcf = new LightingColorFilter( mul, add); > imageView.setColorFilter(lcf); --~--~-~--~~~---~--~~ 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.telephony
I understand that android.telephony.PhoneStateIntentReceiver has been retired. How can I get the 3 neighbor's cell id and signal strength? Thanks! run99ner_ff --~--~-~--~~~---~--~~ 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: Multimedia buffering
Based on the API the video should be progressive download and the video quality should be low On Mon, Feb 9, 2009 at 4:38 PM, AliBaba wrote: > > Hi All, > > I am trying to run the media player from API Demo by specifying the > http based url of the video. In specific I want to play streaming > Video. > > By debugging I found that it is showing the logs for streaming the > video from 1-100 %. But then also it is not playing the video. Can > anybody please help me where(file location) streamed video file get > stored on Android. > > -AliBaba > > > > -- Dilli Rao. M ARIJASOFT +91 - 9703073540 --~--~-~--~~~---~--~~ 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] Repeating alarms with AlarmManager and daylight saving / leap years
Hey I'm looking for a way to trigger repeated actions. I'd like the user to be able to choose the intervals at which these actions will be executed. One should be able to choose from intervals like "Every Day", "Every Month", and "Every Year". The setRepeating(int, long, long, PendingIntent) method of the android.app.AlarmManager class only supports a long value for choosing the interval between the execution of the pending intent. My problem now is, that I can not just compute the number of milliseconds that "fit into one day", since not all days have the same length (daylight saving). This is also a problem for the interval type "year" (leap years). I had a quick look at the android.os.Handler class, but as I understood the documentation I'd need to keep a service thread running for my actions to be executed at some future time. I don't consider that a good option for my needs ;-) Is there anything in the API I could configure with a cron expression or the like? I was also thinking about scheduling an alarm with the AlarmManager for a single execution at a given date/time and then having a receiver that does the rescheduling according to a cron expression attached to the intent. But I don't know if I just got something completely wrong here and I'm reinventing the wheel with that approach :-/ Any advice or pointers would be greatly appreciated :-) Cheers Lorenz --~--~-~--~~~---~--~~ 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] Will the addPreferredActivity method available in the future?
All, Per this thread, http://groups.google.com/group/android-developers/msg/79752885135cc87b, I know that addPackageToPreferred is going away in the future. Can the Googlers comment on the addPreferredActivity under the android.content.pm.PackageManager package? If both methods are going away, are you plan to replace this feature by the way of broadcasting intent? I have listed my use case below. Maybe you can provide me an alternative way other than using the addPreferredActivity? Use Case 1 1. A user installs and runs the application 2. The activity has detected that this application is running for the first time, and offered the user to use this application as the default activity Thanks in advance, Sei --~--~-~--~~~---~--~~ 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] Market, Paid Apps and DRM
Will there be a way for a paid app to be forward-locked, so that it cannot be installed on other people's phones? Thanks --~--~-~--~~~---~--~~ 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] Launch Browser without starting a new Window
Hello, Let's say I have an app that has a "search on Google" button. Every time the user choose it, I want to bring up the browser and run a Google search. Currently, I use: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)); However, each time, it launches a new Window inside the browser. After a few times, the browser complains that it cannot open new Window anymore. Is there a way to tell the browser to re-use the last Window I created? Something like what you would do with in HTML? Thanks Mattaku --~--~-~--~~~---~--~~ 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 with video emulator
Hello everybody! I'm starting an application that needs to use the camera of the emulator. I'm trying to use the Tom Gibara classes ---> http://www.tomgibara.com/android/camera-source But these classes use the "CameraDevice" and "CaptureParams" class, they seems to be depreciated now, look --->http:// code.google.com/intl/es-ES/android/migrating/m5-0.9/changes/ pkg_android.hardware.html Someone knows how to use the new classes for the same porpouse? or another way to use the camera? I'm developing from a Macbook and it would be wonderfull to use the iSight camera. Thanks a lot! --~--~-~--~~~---~--~~ 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] Sub Activities in Tabs?
Hi All, I have a tabbed applicationen setup. I like to keep the tabs visible at all times and work with its subactivites as 'more or less' standalone application threads. Within one or more of these tab subactivities, I'd like to start its own sub-activity, which should not hide the root tabs. Whatever I've found will call ctx.startActivity() which works, but will hide the tabs by using the full screen. Is there a way to limit the sub actitivies to a parent activities bounds, and keep (in my case) the rot Tabs visible? Where shall I look? Cheers! --~--~-~--~~~---~--~~ 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 launch the built-in picture viewer app from my app?
The Activity I think you are looking for is: com.android.camera.ImageGallery2 On Feb 9, 12:09 pm, Freddy wrote: > I don't want to re-invent the wheel and would like to use the existing > android picture viewer. I've found some intents to launch built-in > android app such as the dialer > > Intent intent = new Intent(Intent.ACTION_MAIN); > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > intent.setClassName(this, > "com.android.phone.Dialer"); > startActivity(intent); > > but have not found one for launching the picture viewer. How do I > launch the android built-in picture viewer app? > > Thanks! --~--~-~--~~~---~--~~ 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] 3rd party jar
Hi, Having a problem here with including a 3rd party jar and couldn't find any proper solutions on the group so far. Compiling the HelloWorld app. with an additional 3rd party jar (cglib-nodep). The jar is in the lib/ folder and has been added to build path (add jar). Compiling gives these warnings (about ~30 times): warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.) I then tried to create the dex file myself (dx --dex --output=xx.dex xx.jar) and succeeded without any errors. As far as I know an incompatible jar file (incompatible byte code) shouldn't have passed this one. Am I right here? The problem is that by adding another 3 external jars the number of warnings increases, compiling fills the buffer completely and finally crashes the workspace. Did I miss something? I tried another approach by adding them as user lib but got an undefined reference at runtime. (The .dex and .apk were far too small, so I think they didn't get included) Libs were: cglib-nodep commons-logging antlr-runtime --~--~-~--~~~---~--~~ 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] Charging Android Applications
When will Google allow developers to sell their applications like the Apple Store ? Is there going to be any such android store ? --~--~-~--~~~---~--~~ 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: Android SDK v1.1 - changes / bug fixes or lack of
If you find *new* bugs the right thing to do is file them, http://source.android.com/report-bugs . Remember to search for existing bugs that match your issues before filing new ones. To echo Dianne, 1.1 was not a major platform release and many of the bugs in 1.0 will still exist in 1.1. Cheers, Justin Android Team @ Google On Feb 9, 2:15 pm, Dianne Hackborn wrote: > The 1.1 update was not a major platform release, it was primarily for > localization, and we deliberately avoided doing other things to keep it as > small as possible. I really don't want to read everything about 1.1 that is > no different from 1.0 and people are for some reason unhappy about. :p > > > > On Mon, Feb 9, 2009 at 1:19 PM, thesquib wrote: > > > This thread is for reporting changes and bug fixes (or the lack of > > fixes) to the new 1.1 SDK. > > > So far I have found: > > > Bug: android.graphics.Bitmap.getPixels and > > android.graphics.Bitmap.getPixel still do not correctly function > > (information is lost). > > > Feature missing: Playing sounds from input streams is not available. > > This is very useful when playing from a single resource that contains > > multiple sounds. > > > Documentation is still a bit thin. It is very hard to know how to > > write an optimised application, especially when using the 2D graphics > > API's which have very little explained. > > > Thanks, > > Sam > > -- > 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. 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] Android 1.1_r1 SDK released and developer.android.com launched
Hey developers, today we released the new, 1.1_r1 SDK. This SDK includes some minor updates that you can read more about on the blog, http://android-developers.blogspot.com/2009/02/android-11-sdk-release-1-now-available.html . Also, we've launched the new developer site at http://developer.android.com which has updated documentation for the 1.1_r1 SDK. Cheers, Justin Android Team @ Google --~--~-~--~~~---~--~~ 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: Android SDK v1.1 due soon?
If you read the Android blog, 1.1 SDK is just released Cheers Eric On Feb 10, 4:48 am, monmonja wrote: > You can download it from google but just not on the download page. I > know its not there for a reason but if you really want to try 1.1 > > http://almondmendoza.com/2009/02/09/android-sdk-11/ > > I would suggest anyone to wait for the one on the download page coz > they might still change something or fix something. > > On Feb 9, 9:34 pm, Wijnbo wrote: > > > I already got the 1.1 SDK :-) > > > On 9 feb, 12:25, Holkre wrote: > > > > I myself would also be happy to see theSDK1.1, > > > im excited if WPA2 Enterprise has been addedtothe Wifi Controlls of > > > theSDK, > > > as it is an absolute must have when the Android Platform want´s to > > > become > > > readyfor the business market. > > > > On Feb 9, 1:38 am, Ivan Soto wrote: > > > > > I was sondering the same. > > > > > It's not that my application won't work, but it would be nice to get > > > > theSDK > > > > updated. > > > > > On Sun, Feb 8, 2009 at 3:17 PM, clark wrote: > > > > > > I recently upgraded to RC33 on my G1 and when I uploaded an > > > > > application from within eclipse, I received a message warning that the > > > > >SDKversion on the phone was1.1, which did not match theSDKversion > > > > > of 1.0 I am using. > > > > > > I was wondering when the1.1SDKwill be available for developers. > > > > > I'm not noticing any issues, and I am not sure what, if any, new > > > > > functionality has been added to the1.1SDK. Just thought I'd ask. > > > > > > Regards, > > > > > Scheff's Blend.- Tekst uit oorspronkelijk bericht niet weergeven - > > > > - Tekst uit oorspronkelijk bericht weergeven - --~--~-~--~~~---~--~~ 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: Android SDK v1.1 - changes / bug fixes or lack of
The 1.1 update was not a major platform release, it was primarily for localization, and we deliberately avoided doing other things to keep it as small as possible. I really don't want to read everything about 1.1 that is no different from 1.0 and people are for some reason unhappy about. :p On Mon, Feb 9, 2009 at 1:19 PM, thesquib wrote: > > This thread is for reporting changes and bug fixes (or the lack of > fixes) to the new 1.1 SDK. > > So far I have found: > > Bug: android.graphics.Bitmap.getPixels and > android.graphics.Bitmap.getPixel still do not correctly function > (information is lost). > > Feature missing: Playing sounds from input streams is not available. > This is very useful when playing from a single resource that contains > multiple sounds. > > Documentation is still a bit thin. It is very hard to know how to > write an optimised application, especially when using the 2D graphics > API's which have very little explained. > > > > Thanks, > Sam > > > -- 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. 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] Re: Advanced trackball issues in ListView
A clearer example: Initial - ContactA is expanded |* | ContactA | |* | ContactB |* Ex. 1) What I WANT to happen when I move the trackball down: |** | ContactA |** | ContactB | |** ContactA has contracted, and ContactB has taken over the remaining space from the contraction of ContactA. Ex. 2) What happens NOW when I move the trackball down: after: |** | ContactZ |** | ContactA |** | ContactB | ** ContactA has contracted, but ContactZ (the contact before A in the list) has taken the space from the contraction, and ContactB begins where the EXPANDED ContactA's view ended. --~--~-~--~~~---~--~~ 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] ImageView.setColorFilter and/or LightingColorFilter- how to use them?
How would I be able to adjust a channel (R,G or B) using ImageView.setColorFilter by passing an instance of LightingColorFilter in its construct? For an example, when I create an instance of LightingColorFilter, I adjust the two params that are int values between 0-255. With this instance, I then pass it into setColorFilter. The image always ends up anywhere from being black to blue. How can I adjust the Red or Green channel? LightingColorFilter lcf = new LightingColorFilter( mul, add); imageView.setColorFilter(lcf); --~--~-~--~~~---~--~~ 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: Advanced trackball issues in ListView
A clearer (hopefully) example... What I WANT to happen: before: |* | ContactA | |* | ContactB |* after: |* | ContactA |* | ContactB | |* What happens NOW (in the middle of a list): before: |* | ContactA | |* | ContactB |* after: |* | ContactA | |* | ContactB | |* --~--~-~--~~~---~--~~ 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 launch the built-in picture viewer app from my app?
Intent i = new Intent(Intent.ACTION_VIEW); Uri u = Uri.withAppendedPath (MediaStore.Images.Media.INTERNAL_CONTENT_URI, ""); i.setData(u); startActivity(i); On Feb 9, 12:09 pm, Freddy wrote: > I don't want to re-invent the wheel and would like to use the existing > android picture viewer. I've found some intents to launch built-in > android app such as the dialer > > Intent intent = new Intent(Intent.ACTION_MAIN); > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > intent.setClassName(this, > "com.android.phone.Dialer"); > startActivity(intent); > > but have not found one for launching the picture viewer. How do I > launch the android built-in picture viewer app? > > Thanks! --~--~-~--~~~---~--~~ 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: Age of GPS data
Thanks. Yes, it works much better with requestLocationUpdates set to 0. For the benefit of anyone reading and reusing code, requesting location updates drains the battery very quickly, so remember to unregister the LocationListener whenever you pause the application. Code below. Anna @Override public void onPause() { Log.d(LOG_TAG, "onPause"); // Unregister the LocationListener locationmanager.removeUpdates(listener); super.onPause(); } On Feb 4, 8:52 pm, Ludwig wrote: > The Location object has a getTime() method that should supply you with the > age of the fix. The getLastKnownLocation() call does not miraculously have > another source of location information than what you would get with the > upcall. Set the time in requestLocationUpdates to 0 to get notifications as > frequently as possible: that way you have the most up-to-date location your > device can give you. > > Ludwig > > 2009/2/4 Anna PS > > > > > Hi Ludwig, > > > Thanks for the suggestion. I do implement a listener, when the > > application opens. But I found that the GPS data using > > getLastKnownLocation was often out of date or inaccurate, and that > > caused me real problems, since it's a mapping application and the data > > needs to be very accurate - I need to warn the user if it isn't. Hence > > the polling to make sure it's up to date. (I run the polling in a > > background thread.) > > > I've pasted my listener code below, that I call from onCreate... do > > you suggest any changes? > > > thanks, > > Anna > > > //This function called from onCreate... > > public boolean testProviders() { > > Log.d(LOG_TAG, "testProviders"); > > String location_context = Context.LOCATION_SERVICE; > > locationmanager = (LocationManager) getSystemService > > (location_context); > > listener = new LocationListener() { > > public void onLocationChanged(Location location) { > > } > > > public void onProviderDisabled(String provider) { > > } > > > public void onProviderEnabled(String provider) { > > } > > > public void onStatusChanged(String provider, int > > status, > > Bundle extras) { > > } > > }; > > > locationmanager.requestLocationUpdates("gps", 500, 0, > > listener); > > > Log.d(LOG_TAG, "Checking location with provider " + "gps"); > > > location = locationmanager.getLastKnownLocation("gps"); > > > if (location != null) { > > latitude = location.getLatitude(); > > longitude = location.getLongitude(); > > latString = latitude.toString(); > > longString = longitude.toString(); > > Log.d(LOG_TAG, "Location found: latitude" + > > latString > > + " and longitude " + longString); > > return true; > > > } else { > > Log.d(LOG_TAG, "Location not found"); > > return false; > > } > > > On 2 Feb, 12:50, Ludwig wrote: > > > I suggest you better implement a location listener, which is much more > > > light-weight than the busy polling you are implementing. You can cancel > > your > > > subscription to location updates once you have one that satisfies > > you.Ludwig > > > > 2009/2/1 Anna PS > > > > > Great - thank you. I'll remember to read the documentation next > > > > time :) > > > > > I've pasted my code below in case anyone wants to borrow it: it keeps > > > > polling for up-to-date and accurate GPS data, up to a maximum of 10 > > > > seconds. If by then the GPS data is old or not accurate enough, it > > > > just returns false. > > > > > The code feels a bit dubious, but it seems to do the job. > > > > > Anna > > > > > long locationTime = location.getTime(); > > > > long currentTime = System.currentTimeMillis(); > > > > timeDifference = (currentTime - locationTime) / > > > > 1000; > > > > > float accuracy = location.getAccuracy(); > > > > int count = 0; > > > > > // Wait for accurate GPS data, up to a maximum > > of 10 > > > > seconds before > > > > // throwing an error > > > > while (((timeDifference > 10) || (accuracy > > > 20.0)) > > > > && (count < > > > > 20)) { > > > > location = > > > > locationmanager.getLastKnownLocation("gps"); > > > > locationTime = location.getTime(); > > > >
[android-developers] Re: Advanced trackball issues in ListView
A clearer (hopefully) example... What I want to happen: |* ** | ContactA | ContactA | ==> |** | | ContactB | ContactB | | |* What does happen: |* ** | ContactA | ContactA | ==> | | |** | ContactB | ContactB | | |* --~--~-~--~~~---~--~~ 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] Advanced trackball issues in ListView
Hey all, Have some nitpicky scrolling issues in ListView that I don't expect many people to know the answer to, but if there are any experts in ListView, your help would be greatly appreciated. I'm doing a ListView of contacts such that one contact, the contact that the viewer is currently looking at, has a larger view than the other contacts, example shown below. |* | Contact |* | CONTACT | |* | Contact |* I have it set up so that if you move up and down with the trackball, the expanded contact changes such that moving down on the trackball will produce this result: |* | Contact |* | Contact |* | CONTACT | |* This seems to work great for the contacts that fit into the first screen, but once you use your finger to scroll to a different part of the list, I seem to run into a semi-annoying problem when moving the trackball. The comments in the ListView code describes what should happen when I move the trackball down: * Case 1: Scrolling down. */ /* * Before After *| || | *+---++---+ *| A || A | *| 1 | => +---+ *+---+| B | *| B || 2 | *+---++---+ *| || | * *Try to keep the top of the previously selected item where it was. *oldSel = A *sel = B */ This works perfectly for the list of contacts displayed on the initial screen. However, once I move to another portion of the list, it seems that the list is keeping the bottom of the previously selected item where it was, and not the top. So, something like this: /* * Before After *| || | *+---+ +---+ *| A || A | *| 1 | => || *+---+ +---+ *| B || B | *+---+ | 2| *| |+---+ */ (If this ascii doesn't display correctly, I'll post another example in my reply.) In this case, the position of the second selected contact is determined by the BOTTOM of the previously selected contact, giving the ListView a "jumpy" feeling and allowing me to only view ~3 contacts before having to use my finger to move to the next screen. It's a problem that's not a gamestopper, but something that can hurt the user experience of the application. Anyway, I know that this is a pretty advanced use case, so if there's anyone that can help me out with this, I would be very grateful. Thanks, James --~--~-~--~~~---~--~~ 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: quick questions about Skia in android
Start your adventure by instantiating SkGLCanvas (after you have a current gl context) and then draw into it. On Mon, Feb 9, 2009 at 4:31 PM, thesquib wrote: > > "Not officially" supported, but is possible? How might we go about > using this unsupported redirection to GL canvas? > > > On Jan 6, 3:43 am, Mike Reed wrote: >> Skia is a 2D engine for drawing to abitmap. However, there is >> experimental support for a canvas that redirects its calls to aGL >> context, but this is not officially supported at the moment. >> >> On Dec 31, 2008, at 3:15 AM, Andy Quan wrote: >> >> Anyone knows what the relationship between Skia and OpenGL is? >> Is Skia for 2D purpose only? >> Is Skia in android accelarated by OpenGL(libagl)? >> >> -- >> Regards, >> Andy Quan > > > --~--~-~--~~~---~--~~ 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: access to class not allowed
On Feb 7, 1:09 am, johnny wrote: > So from which version, rc1, 1.0 or cupcake, the bug in Dalvik is > fixed? Just want to make it easier when communicating with the author > of the apk file. I don't remember precisely. Since I'm not sure this is the problem you're experiencing, it would probably be best to send the author some information about what version of the platform you're running, along with a healthy snippet from the log file. --~--~-~--~~~---~--~~ 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: quick questions about Skia in android
"Not officially" supported, but is possible? How might we go about using this unsupported redirection to GL canvas? On Jan 6, 3:43 am, Mike Reed wrote: > Skia is a 2D engine for drawing to abitmap. However, there is > experimental support for a canvas that redirects its calls to aGL > context, but this is not officially supported at the moment. > > On Dec 31, 2008, at 3:15 AM, Andy Quan wrote: > > Anyone knows what the relationship between Skia and OpenGL is? > Is Skia for 2D purpose only? > Is Skia in android accelarated by OpenGL(libagl)? > > -- > Regards, > Andy Quan --~--~-~--~~~---~--~~ 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: Android SDK v1.1 - changes / bug fixes or lack of
Mark Murphy wrote: > thesquib wrote: >> This thread is for reporting changes and bug fixes (or the lack of >> fixes) to the new 1.1 SDK. > > What "new 1.1 SDK"? Never mind... http://developer.android.com/sdk/1.1_r1/index.html -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ 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: Android SDK v1.1 - changes / bug fixes or lack of
thesquib wrote: > This thread is for reporting changes and bug fixes (or the lack of > fixes) to the new 1.1 SDK. What "new 1.1 SDK"? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ 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 SDK v1.1 - changes / bug fixes or lack of
This thread is for reporting changes and bug fixes (or the lack of fixes) to the new 1.1 SDK. So far I have found: Bug: android.graphics.Bitmap.getPixels and android.graphics.Bitmap.getPixel still do not correctly function (information is lost). Feature missing: Playing sounds from input streams is not available. This is very useful when playing from a single resource that contains multiple sounds. Documentation is still a bit thin. It is very hard to know how to write an optimised application, especially when using the 2D graphics API's which have very little explained. Thanks, 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: in-memory live object histogram
On Feb 9, 6:00 am, GiladH wrote: > Is there a way of querying Android (or G1 or DDMS) for a list of all > currently live objects > by type and by nymber of instances. > > That is: > - your app currently have 122 objects of type MyClass > - your app currently have 201 objects of type MyOtherClass You can generate an "hprof" dump by using "runhat"; some information is available in this thread: http://groups.google.com/group/android-developers/browse_thread/thread/e2653bff9e0eee3e/620b68305da4586e The android-specific dump must be converted with "hprof-conv"; sources are currently available here: http://bigflake.com/HprofConv.c.txt The conversion tool, and a new API for generating dumps, will be included in a future release. Once you have the hprof output, you can process it with a number of tools, including "jhat" (part of the JDK) and "MAT". --~--~-~--~~~---~--~~ 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: Loading DEX files at runtime from SDCARD - Possible?
Thanks for the response Dianne, I still live in the cotton wool word of University where third parties are friendly types. Understood, I did some more searching and found another thread in which you contributed regarding this topic; http://groups.google.com/group/android-developers/browse_thread/thread/7ee9248deeacd556/b116df9cffe4e045?lnk=gst&r#b116df9cffe4e045 In case anyone else is on this trail. I will also reply to your message there as I need a little further clarification on the options available for a plugin style architecture. Kind regards, Gavin On Mon, Feb 9, 2009 at 8:03 PM, Dianne Hackborn wrote: > Sorry, this is not currently supported. > > And you really really wouldn't want to do this, because it would allow any > other app installed on the device to take over your own and use any of its > permissions for malicious purposes under the guise of being you. > > On Mon, Feb 9, 2009 at 5:09 AM, Gav wrote: > >> >> Hey! >> >> BACKGROUND >> >> I would like my users to develop their own routines for image >> manipulation. Lets presume that a third party has written a class >> which implements one of my interfaces; >> >> public abstract class PixelBinaryFilter extends BinaryFilter{ >> ... >>protected abstract int generatePixel(int p1, int p2); >> ... >> } >> >> And hence has a class with one method defined, which could multiply >> pixel values together, subtract them find their lowest common multiple >> basically any routine they can think of. >> >> This class would be complied and then converted to DEX using the dx >> tool. >> >> The third party would then download the .dex file to their phones >> SDCARD, probably via my application using a 'Get New Routines' request >> which takes the URL of the file. >> >> QUESTION >> >> If I have a .dex file on the SDCARD how can I load it at runtime? The >> class name and path would be known. >> >> I have been using the Class.forName command for the standard routines >> but I don't know how (if) this will work with classes outside of the >> application. >> >> Many thanks, >> >> Gavin >> >> >> > > > -- > 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. 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] Re: Dynamically changing the language at runtime
Like I said, there isn't really a way. You are doing stuff that isn't really supported, so you're going to be hacking around. Forcibly changing the configuration of resources is already a hack -- for example if the user flips the lid the configuration will change, blowing away what you set. I probably shouldn't have said anything. :} On Mon, Feb 9, 2009 at 12:39 PM, Evgeny V wrote: > So, what can be a best way to restart the app except to ask user restart > manually? > > Thanks, > Evgeny > > On Mon, Feb 9, 2009 at 9:49 PM, Dianne Hackborn wrote: > >> You will need to do all of the UI recreation in your activity. We don't >> currently have a way for an activity to ask that it be restarted, sorry. >> Like I said, this isn't really supported. >> >> >> On Mon, Feb 9, 2009 at 11:29 AM, Mark Nuetzmann > > wrote: >> >>> >>> I have a settings dialog/activity where I allow the user to change the >>> locale. Within that activity i call >>> >>>Resources res = ctx.getResources(); >>>// Change locale settings on the device >>>DisplayMetrics dm = res.getDisplayMetrics(); >>>android.content.res.Configuration conf = >>> res.getConfiguration(); >>>conf.locale = new Locale(language_code.toLowerCase(), >>> coutry_code.toUpperCase()); >>>res.updateConfiguration(conf, dm); >>> >>> and call onChanged() for my settings ListView... everything changes >>> perfectly. Very nice. >>> >>> Then I hit the back button to go back to the previous activity >>> thinking everything should be switched; nope. Everything is still in >>> the previous locale. So I added the above code in the onResume() of >>> the activity thinking that would do it; nope. Also, when I click the >>> menu button of this activity again (not first time) I do not get >>> called in onCreateOptionsMenu() it just displays the previous menu. >>> >>> My question is what is the correct way to force existing activities to >>> reload using the new local? >>> >>> thanks. >>> Mark >>> >>> >>> On Jan 26, 10:39 pm, Raja Nagendra Kumar >>> wrote: >>> > Diannel thank you, Deep thank you for the complete source spippet.. >>> > >>> > On Jan 27, 1:23 am, "deepdr...@googlemail.com" >>> > >>> > wrote: >>> > > ya, great, thanks, this works for me ! : >>> > >>> > > Resources res = getResources(); >>> > > DisplayMetrics dm = res.getDisplayMetrics(); >>> > > Configuration conf = res.getConfiguration(); >>> > > conf.locale = Locale.GERMANY; >>> > > res.updateConfiguration(conf, dm); >>> > > firstline= res.getString(R.string.firstline); >>> > >>> > > On Jan 26, 9:09 pm, Dianne Hackborn wrote: >>> > >>> > > > You can't just modify the structure, you need to give a new >>> Configuration of >>> > > > new values to Resources.updateConfiguration(). >>> > >>> > > > On Mon, Jan 26, 2009 at 11:21 AM, deepdr...@googlemail.com < >>> > >>> > > > deepdr...@googlemail.com> wrote: >>> > >>> > > > > I tried : >>> > >>> > > > >Resources res = getResources(); >>> > > > >res.getConfiguration().locale = Locale.GERMANY; >>> > > > >firstline= res.getString(R.string.firstline); >>> > >>> > > > > in my onCreate() . But, although I do have >>> res/values-de/strings.xml >>> > > > > this still gives me the english string for firstline. >>> > > > > So it seems to me that there's no easy way to test different >>> languages >>> > > > > without an actual device for that language (?) >>> > >>> > > > > On Jan 24, 10:28 pm, Dianne Hackborn >>> wrote: >>> > > > > > This isn't really supported, though you can change the language >>> of the >>> > > > > > Configuration used by your Resources object. This will only >>> impact your >>> > > > > own >>> > > > > > app, though, not things displayed by others like your >>> notifications >>> > > > > (those >>> > > > > > will still use the system's locale). >>> > >>> > > > > > On Fri, Jan 23, 2009 at 10:39 PM, Raja Nagendra Kumar < >>> > >>> > > > > > nagendra.r...@gmail.com> wrote: >>> > >>> > > > > > > Hi Romain, >>> > >>> > > > > > > Thank You Romain, a follow up to this how do I change the >>> default >>> > > > > > > languge to choose in my application based on the menu we >>> provide with >>> > > > > > > in the andorid application.. >>> > > > > > > I may still want to keep my phone locale some thing deferent >>> than the >>> > > > > > > application locale. >>> > >>> > > > > > > Regards, >>> > > > > > > Nagendra >>> > >>> > > > > > > On Jan 24, 11:16 am, Romain Guy >>> wrote: >>> > > > > > > > Hi, >>> > >>> > > > > > > > All you need to do is place your resources in locale >>> specific >>> > > > > > > > directories. For instance: >>> > >>> > > > > > > > res\ >>> > > > > > > > drawable-en\ >>> > > > > > > > values-fr\ >>> > > > > > > > layout-jp\ >>> > >>> > > > > > > > In your example to localize the app in English and Germa