02-16-2010 10:28 AM - edited 02-16-2010 11:21 AM
I have run the CHAPI demo example provided with the JDE samples.
I have one query , when i press the back key control returns to my application , but the song keeps on playing.
I want to kill that song,but dont know how to do it.
02-16-2010 11:34 AM
Please anybody, need some inputs to start with.
02-17-2010 12:50 AM
Please any inputs.
02-17-2010 02:22 AM
As per my understanding you want to stop the player application when you click on the return key on your device. Right?
Firstly, you will have to get the instance of the player which is playing the song. Then you need to call the player instance's stop() method to stop the player.
Hope this helps.
02-17-2010 09:36 AM
Thanks for the reply, but i guess you misunderstood my question.
I have started the player using invocation method and registring it through registy.
Now player is played outside my application, when i press the backkey on device , control is returned to my application , but song continues playing , how to stop that song.
02-17-2010 10:54 AM
is it possible for you to post the code snippet where you are starting the player via invocation?
apart from that you can try to kill the camera application by using an EventInjector class.
The sample code for the same is as below:
public void closePlayer()
EventInjector.KeyEvent inject = new EventInjector.KeyEven (EventInjector.KeyEvent.KEY_DOWN,Characters.ESCAPE
i am not sure if this will do the trick but its just a guess.......
Hope it helps,
02-25-2010 10:52 AM
Thanks , but actually i am invoking player directly using method described in CHAPI demo example,
Now when i press back key on device , i want to kill the player, but as control is out of my application i will not be able to catch back key, is there any way of catching the back key.
04-21-2010 06:03 AM
Any help on this
04-21-2010 06:17 AM
You can just play another sound and it will stop the first player on CDMA, or you could play 2 on GSM. That's the trick I use in one of my apps, I just have a blank audio file that I play whenever I want to kill the audio.
04-21-2010 06:24 AM
but i am using invocation method to play , so if i play blank audio file will it not show player screen.
or i should play blank audio file using j2me player