Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-22 Thread leledumbo
> My question is whether it is possible to hook into (as an example) the java media player events without writing java code. As for the opposite direction, calling the media player's Start method from pascal does not need any java code. If it can be done from C, then it can be done from Pascal

Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-22 Thread patspiper
On 22/04/14 12:02, leledumbo wrote: My question is whether it is possible to hook into (as an example) the java media player events without writing java code. As for the opposite direction, calling the media player's Start method from pascal does not need any java code. If it can be done from C

Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-22 Thread leledumbo
> My question is if it can be done without a java wrapper class as this would make android programming much easier (unless I have misunderstood your reply). Perhaps I misunderstood your question in the first place. Could you instead draw a diagram (flowchart?) and emphasize (red circle or someth

Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-22 Thread patspiper
On 22/04/14 18:36, leledumbo wrote: My question is if it can be done without a java wrapper class as this would make android programming much easier (unless I have misunderstood your reply). Perhaps I misunderstood your question in the first place. Could you instead draw a diagram (flowchart?)

Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-22 Thread leledumbo
> Now to the java media player: You assign a pascal method to the OnCompetion event (the question is how), and start the player (pascal/jni). Once the song is over, OnCompletion will fire and call the assigned pascal method. Ah... I see. That is AFAIK not possible. Java doesn't have the proced

Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-22 Thread patspiper
On 22/04/14 19:26, leledumbo wrote: Now to the java media player: You assign a pascal method to the OnCompetion event (the question is how), and start the player (pascal/jni). Once the song is over, OnCompletion will fire and call the assigned pascal method. Ah... I see. That is AFAIK not possi