I am trying to add a gif animation over a camera in android. The idea is to get the animation becoming part of the video being taken by the phone camera (something like augmented reality).
I have tried 2 options.
-
Add GIF on camera view, using http://droid-blog.net/2011/10/14/tutorial-how-to-use-animated-gifs-in-android-part-1/.
With this I will need to develop the whole thing in native android
-
Use a third party library like QCAR https://developer.qualcomm.com/mobile-development/mobile-technologies/augmented-reality.
I was successfully able to create animation over the marker, but in my case I need the animation to be available without marker, something like on a button press.
Has anybody tried achieving similar functionality (adding animation to video or photos clicked by camera)? What is a good approach to achieve this?
Was not able to find a very smooth way to run a gif on cameraview as it is, but converting the gif to series of images and animating using AnimationDrawable class did the trick