I'm don't know java so making my own library is not possible just yet. however if I can just capture a response then I can use that to toggle my menu back and forth.
#if java
// Check whether sliding menu is opened or closedif(menu.isMenuShowing()){//Do action here}
#end if