[android-developers] Re: Out of memory exception on setting wallpaper
Hi , Thanks for the help . The problem is resolved . I had used a ContentResolver for listening to contacts updated and dint unregister them in the onDestroy() method . Now have included the code changes and it seems to work fine . Im still in a doubt if this was the real problem for the out of memory exception. Any comments are welcome . Thanks and Regards, Navin On Mar 12, 9:26 pm, Romain Guy romain...@google.com wrote: getWallpaper() is not leaking. The default Home app is using it and does not experience out of memory errors because of that. I am more than willing to fix any existing memory leak in the framework (and I did several times) or in the default apps (and I did several times) but developers should really stop assuming that out of memory errors are always caused by the framework. It is *very* easy for an application to leak or simply to use too much memory. On Thu, Mar 12, 2009 at 7:24 AM, JP joachim.pfeif...@gmail.com wrote: Sounds like the Drawable remains attached to a View between rotations. See blog post: http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks On Mar 12, 3:29 am, ursnavin ursna...@gmail.com wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting thewallpaperonCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Thanks Navin -- 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: Out of memory exception on setting wallpaper
Hey, the getWallpaper() is the frameworks getWallpaper() function.Everytime the xception occurs only inside this function.Is this a bug in android?? On Mar 12, 3:56 pm, Mark Murphy mmur...@commonsware.com wrote: ursnavin wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into anoutofmemoryexception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Sounds like amemoryleak. Are you sure getWallpaper() isn't doing something that would hold references to past bitmaps, causing them not to get garbage collected? -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training in Sweden --http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ 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] Out of memory exception on setting wallpaper
Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Thanks Navin --~--~-~--~~~---~--~~ 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: Out of memory exception on setting wallpaper
Hey, Thanks for the reply, The getWallpaper() is the android frameworks getWallpaper() function. On Mar 12, 3:56 pm, Mark Murphy mmur...@commonsware.com wrote: ursnavin wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Sounds like a memory leak. Are you sure getWallpaper() isn't doing something that would hold references to past bitmaps, causing them not to get garbage collected? -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training in Sweden --http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with continuos animation of children on long press of keys in a Viewgroup.
Hi, Thanks for the reply,. In that how could we implement uninterupted animation on keydown() method when there is a long press of the key. It would be really helpful if you could suggest a way to do it... On Mar 6, 12:57 pm, Romain Guy romain...@google.com wrote: You should NOT start animations from other threads, On Thu, Mar 5, 2009 at 11:48 PM, ursnavin ursna...@gmail.com wrote: Hi all, Suppose,If the user long presses a key,the animation should run till the keyup... For this i tried starting the animation on a new thread with a lock on a flag variable,till the first animation ends. Now when the user is still pressing his key,the thread is created with the nxt animation in it On keyup the main thread gets the lock on the flag variable,and relays the child views in thier new position This logic seems to work fine,but after some duration the animation stops and the application simply hangs, Is there something that i am missing here.It would be great if anyone can tell whether the approach followed is correct or should i do something else??? -- 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: ViewGroup, Views and Animation
Hi all, I have got a similar problem. Suppose,If the user long presses a key,the animation should run till the keyup... For this i tried starting the animation on a new thread with a lock on a flag variable,till the first animation ends. Now when the user is still pressing his key,the thread is created with the nxt animation in it On keyup the main thread gets the lock on the flag variable,and relays the child views in thier new position This logic seems to work fine,but after some duration the animation stops and the application simply hangs, Is there something that i am missing here.It would be great if anyone can tell whether the approach followed is correct or should i do something else??? On Feb 15, 5:35 am, Romain Guy romain...@google.com wrote: UseAnimation.setRepeatMode() andAnimation.setRepeatCount(). On Sat, Feb 14, 2009 at 4:31 PM, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Ok, well I'm a bit new to animations on android, and wasn't sure if ViewGropus was the right path for me. Btw how would you set the repeat mode for ananimation? I've tried the java way but it didn't work. On Feb 14, 11:57 pm, Romain Guy romain...@google.com wrote: Animations have a repeat mode, no need to do it yourself. Also, why wouldn'tViewGrouphandle the startOffset? From your email, I don't really understand what your problem is exactly :) -- 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] Problem with continuos animation of children on long press of keys in a Viewgroup.
Hi all, Suppose,If the user long presses a key,the animation should run till the keyup... For this i tried starting the animation on a new thread with a lock on a flag variable,till the first animation ends. Now when the user is still pressing his key,the thread is created with the nxt animation in it On keyup the main thread gets the lock on the flag variable,and relays the child views in thier new position This logic seems to work fine,but after some duration the animation stops and the application simply hangs, Is there something that i am missing here.It would be great if anyone can tell whether the approach followed is correct or should i do something else??? --~--~-~--~~~---~--~~ 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] Rolodex View
Hi, I am planning to implement a RolodexView in android using the gallery widget.Am fairly new to android.Is it possible to extend the Gallery widget to create a rolodex or should we need to create our own customised component. Any inputs would great. Thanks, Navin --~--~-~--~~~---~--~~ 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: Rolodex View
Hi, It would be great if someone can help me on this. On Feb 26, 2:01 pm, ursnavin ursna...@gmail.com wrote: Hi, I am planning to implement a RolodexView in android using the gallery widget.Am fairly new to android.Is it possible to extend the Gallery widget to create a rolodex or should we need to create our own customised component. Any inputs would great. Thanks, Navin --~--~-~--~~~---~--~~ 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] Active Idle screen
hi, Is there anyway to replace the idle screen with a custom built idle screen? I tried searching the blogs but coudnt get much info on it. Thanks, Navin --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---