I'm trying to insert an animation in my app and I found two alternatives:
the first one is to use the "Drawable Animation" with the "animation-list", but my animation is made of 125 full screen frames and when I tried to start it the app crashed with the "java.lang.OutOfMemoryError"
.
I tried to fix the problem increasing the heap size by setting the android:largeheap="true"
but didn't work.
Is a possible solution converting the images from jpg to png?
I found the solution here java.lang.OutOfMemoryError occur on the animation Loading? and something here Causing OutOfMemoryError in Frame by Frame Animation in Android, but I didn't find a correct solution.
The second way is to create the animation in javascript/html5 and putting it in a webview, but I don't know if this would be a good solution for the majority of android devices and I don't know if it is possible create a communication bridge between the webview and the app.
I found this http://developer.android.com/guide/webapps/webview.html#BindingJavaScript but I'm not sure if it will work.
So could you please give some idea on finding a way for complex animation in android?