Need help to make USB accessory mode in android

Hi, I am trying to use Arduino DUE which has inbuilt OTG, in USB host mode and an android tablet to receive some data. I tried some ADK options, but tired of solving build issues one after one with ANT build, java versions etc.
I was able to make successful communication when I make make tablet as host(tried it with UNO not with DUE)
Any help would be appreciated.