02-08-2010 03:44 AM - edited 02-08-2010 03:46 AM
From my appluication I want to close (Exit) the native Audio and Video Player, if it is running. Please provide the code snip if any one have the idea.
Thanks & Regards,
02-08-2010 04:22 AM
I also have fetched the same issue. But in case of me I have invoke the media application from my application using
Invocation invocation = new Invocation(filePathTemp); invocation.setResponseRequired(false); invocation.setAction(ContentHandler.ACTION_OPEN); // Get the content handler for the media Registry _registry = Registry.getRegistry("Main"); // Invoke the content handler. _registry.invoke(invocation);
It sends my application in background and starts media application in foreground. But after finishing the play, when user press Back button in the device my application comes in foreground and the media application goes in background. I want to close the media application at that time. How to do that?
02-23-2010 05:24 PM
I also have this problem. Subsequent calls to invoke the media player will not work and this is printed in the log:
Detected background switch for MyApp(190) who has NO tunnels open - defocus NOT called
Detected foreground switch for net_rim_bb_mediacontenthandler(192) who has NO tunnels open - focus NOT called
If the media player can't be closed is there another work around?
05-21-2010 04:40 AM - edited 05-21-2010 04:43 AM
I had the same problem.
I resolved it by setting the invocation object's setResponseRequired to "true" and waiting for the Registry object's response.
Invocation.setRegistryRequired(true); Registry registry = Registry.getRegistry(MyClass.class.getName()); registry.invoke(invocation); Invocation response = registry.getResponse(true); if(response.getStatus() == Invocation.OK) System.exit(0);
07-30-2010 10:05 AM
If I open the media player manually, on back click the media player gets closed but if I use Invoke to start the media player, on back click it does not get closed. Is there any alternative method to stop the Media player.
Thanks & Regards,
09-03-2010 06:28 AM
Were you able to close the native media player using above method?
I still face the same issue. If I clicks on back button, the player goes in the background and does not close. I have to manually close the player by clicking on menu and selecting close option.
03-01-2011 05:40 AM
Registry _registry = Registry.getRegistry("Main");
"Main" is what ?
Is it a class name? / package name?
I can not open any video file. please tell me how to open a video file in BB's native player?
I want to play a video link. suppose there is a video on youtube. I know the source link.. Can it be possible to play it in Blackberry's native player????
Please please help me...
Thanks in Advance..
08-07-2012 07:35 AM
How you play the youtube video using invocation class
I have tried it using this link : http://www.youtube.com/watch?v=TiviN10YCTQ
but its only open that page. video is not playing..
please give me some solutions...