in my app i am trying to download some video in button click. i am showing a progress bar in the notification area, i have already asked a question regarding this here (it is under bounty)
Now to solve my problem i changed the code to be as follows, when the first button is clicked it starts an progress bar in notification by a class UploadService extends IntentService and the progress bar is shown
When the second button is clicked it tries to start another progress bar in notification by a class UploadService2 extends IntentService, but immediately the app gets crashed and it shows the following error as follows
E/dalvikvm-heap( 2325): Out of memory on a 10171204-byte allocation.
E/AndroidRuntime( 2325): Uncaught handler: thread IntentService[UploadService2] exiting due to uncaught exception
E/AndroidRuntime( 2325): java.lang.OutOfMemoryError
E/AndroidRuntime( 2325): at uk.me.hardill.android.notification.UploadService2$1.run(UploadService2.java:93)
E/AndroidRuntime( 2325): at uk.me.hardill.android.notification.UploadService2.onHandleIntent(UploadService2.java:134)
E/AndroidRuntime( 2325): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:30)
E/AndroidRuntime( 2325): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2325): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2325): at android.os.HandlerThread.run(HandlerThread.java:60)
My UploadServices class is here