As of now there is no SDK to directly add OTA functionality. Can you tell us what exact error you are getting.
Did you find any answer for this ? Even I have an android app from which I have to do OTA firmware update. Reading and understanding the code is so much difficult. Did you get any documentation or flow chart on how to use the code ?