you need a function/method in your library that accepts parameter from the app, and you just call it from the app, passing that parameter. how do you set the player in motion anyway? did you write a wrapper? or are you using some .jar you found? if you wrote a wrapper, you add the method. if it's an external .jar, it needs to have such a public method in place already, and you tap into it with a javaobject.runmethod() call