How can store images in cache or buffer

Put your problem here if it does not fit any of the other categories.

How can store images in cache or buffer

Postby chetan » Sun Oct 11, 2009 10:12 am

Hi All,

Any one can help me for how to develop the code in which store the more than 1000 images in cache or buffer of Android?

If you have any solution please replay me?

If I m try to store image in Drawable class then bellow errors are generate.

D/dalvikvm( 997): GC freed 6619 objects / 356608 bytes in 595ms
E/dalvikvm-heap( 997): 16380-byte external allocation too large for this process.
E/ ( 997): VM won't let us allocate 16380 bytes
W/dalvikvm( 997): threadid=63: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime( 997): Uncaught handler: thread Thread-102 exiting due to uncaught exception
E/dalvikvm-heap( 997): 16200-byte external allocation too large for this process.
E/ ( 997): VM won't let us allocate 16200 bytes
W/dalvikvm( 997): threadid=85: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime( 997): Uncaught handler: thread Thread-113 exiting due to uncaught exception
E/AndroidRuntime( 997): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
E/AndroidRuntime( 997): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
E/AndroidRuntime( 997): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:375)
E/AndroidRuntime( 997): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:212)
E/AndroidRuntime( 997): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:663)
E/AndroidRuntime( 997): at android.graphics.drawable.Drawable.createFromStream(Drawable.java:641)
E/AndroidRuntime( 997): at com.example.submitExample.searchList.ImageOperations(searchList.java:464)
E/AndroidRuntime( 997): at com.example.submitExample.searchList.access$0(searchList.java:458)
E/AndroidRuntime( 997): at com.example.submitExample.searchList$imgShow.run(searchList.java:426)
E/AndroidRuntime( 997): at java.lang.Thread.run(Thread.java:1058)
E/AndroidRuntime( 997): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
E/AndroidRuntime( 997): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
E/AndroidRuntime( 997): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:375)
E/AndroidRuntime( 997): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:212)
E/AndroidRuntime( 997): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:663)
E/AndroidRuntime( 997): at android.graphics.drawable.Drawable.createFromStream(Drawable.java:641)
E/AndroidRuntime( 997): at com.example.submitExample.searchList.ImageOperations(searchList.java:464)
E/AndroidRuntime( 997): at com.example.submitExample.searchList.access$0(searchList.java:458)
E/AndroidRuntime( 997): at com.example.submitExample.searchList$imgShow.run(searchList.java:426)
E/AndroidRuntime( 997): at java.lang.Thread.run(Thread.java:1058)
I/Process ( 568): Sending signal. PID: 997 SIG: 3
I/dalvikvm( 997): threadid=7: reacting to signal 3
I/Process ( 568): Sending signal. PID: 997 SIG: 3
W/ActivityManager( 568): Process com.example.submitExample has crashed too many times: killing!
D/ActivityManager( 568): Force finishing activity com.example.submitExample/.searchList
D/ActivityManager( 568): Force finishing activity com.example.submitExample/.submitExample
D/ActivityManager( 568): Force finishing activity com.example.submitExample/.searchList
D/ActivityManager( 568): Force finishing activity com.example.submitExample/.submitExample
D/ActivityManager( 568): Force finishing activity com.example.submitExample/.login
D/ActivityManager( 568): Force finishing activity com.example.submitExample/.submitExample
D/ActivityManager( 568): Force removing process ProcessRecord{437586b8 997:com.example.submitExample/10021} (com.example.submitExample/10021)
I/Process ( 568): Sending signal. PID: 997 SIG: 9
I/WindowManager( 568): WIN DEATH: Window{436c74e0 com.example.submitExample/com.example.submitExample.submitExample paused=true}
I/WindowManager( 568): WIN DEATH: Window{435e1d70 com.example.submitExample/com.example.submitExample.login paused=true}
I/WindowManager( 568): WIN DEATH: Window{43624a48 com.example.submitExample/com.example.submitExample.login paused=true}
I/WindowManager( 568): WIN DEATH: Window{436ae190 com.example.submitExample/com.example.submitExample.submitExample paused=true}
I/WindowManager( 568): WIN DEATH: Window{43785d38 com.example.submitExample/com.example.submitExample.searchList paused=true}
I/WindowManager( 568): WIN DEATH: Window{436b5e78 com.example.submitExample/com.example.submitExample.submitExample paused=true}
I/WindowManager( 568): WIN DEATH: Window{436e4f30 com.example.submitExample/com.example.submitExample.searchList paused=true}
I/WindowManager( 568): WIN DEATH: Window{43667d78 com.example.submitExample/com.example.submitExample.submitExample paused=true}
D/ActivityManager( 568): Received spurious death notification for thread android.os.BinderProxy@4367dfa0
W/ActivityManager( 568): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 568): Activity destroy timeout for HistoryRecord{437746d8 {com.example.submitExample/com.example.submitExample.submitExample}}
W/ActivityManager( 568): Activity destroy timeout for HistoryRecord{43739d88 {com.example.submitExample/com.example.submitExample.searchList}}
W/ActivityManager( 568): Activity destroy timeout for HistoryRecord{437021f8 {com.example.submitExample/com.example.submitExample.submitExample}}
W/ActivityManager( 568): Activity destroy timeout for HistoryRecord{436f6498 {com.example.submitExample/com.example.submitExample.login}}
W/ActivityManager( 568): Activity destroy timeout for HistoryRecord{436f47e0 {com.example.submitExample/com.example.submitExample.submitExample}}


Thanks
Chat.
User avatar
chetan
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Oct 11, 2009 9:59 am
Location: Ahmedabad

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests