- BlackBerry Support Community Forums
- Welcome & Introductions
- Announcements
- Your Stories
- Smartphones
- BlackBerry® Bold™ 9700 smartphone
- BlackBerry® Tour™ 9630
- BlackBerry Storm - BlackBerry 9500 Series Smartphone
- BlackBerry Bold - BlackBerry 9000 Series Smartphone -
- BlackBerry Curve - BlackBerry 8900 Series Smartphone
- BlackBerry 8800 Series Smartphone
- BlackBerry Curve 8500 Series Smartphone
- BlackBerry Curve - BlackBerry 8300 Series Smartphone
- BlackBerry Pearl - BlackBerry 8200 Series Smartphone
- BlackBerry Pearl- BlackBerry 8100 Series Smartphone -
- Other BlackBerry Smartphones and Devices
- General BlackBerry Smartphone Functions and Features
- BlackBerry Accessories
- Software
- BlackBerry® Desktop Software
- BlackBerry® for Mac
- BlackBerry® Device Software
- BlackBerry® Applications, Third-Party Applications & BlackBerry App World
- BlackBerry App World - General Discussions
- Downloaded Applications for BlackBerry Devices
- Solutions
- BlackBerry® Enterprise Server Version 5.0
- BlackBerry® Enterprise Solution
- BlackBerry® Internet Service
- BlackBerry® Professional Software and BlackBerry® Unite!
- BlackBerry® Training and Certification
- BlackBerry® Training and Certification
- BCP-410
- BlackBerry Development
- Dev Blog
- BlackBerry App World™ Development
- Java Development
- Web Development
- MDS Runtime Development
- BlackBerry Enterprise Server Development
- Product Management: The BlackBerry Application Platform
- BlackBerry Themes & Animated Graphics
- Community Forums Feedback
- Forum Feedback and Ideas
- BlackBerry Community Post
- BlackBerry Community Post
- Register
- ·
- Sign In
- ·
- Help
- ·
- New Topics
- ·
- New Posts
- BlackBerry Support Community Forums
- :
- BlackBerry Development
- :
- Java Development
- :
- problem invoking media content handler repeatedly
- Subscribe to RSS Feed
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
problem invoking media content handler repeatedly
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-03-2009 03:35 PM
Hi,
I need to be able to play different files for user to view (audio or text) using content handler but there is some problem. my environment is
Blackberry 9000, v4.6.0.162. Component pack 4.6.1
the code is :
Invocation invocation =
new Invocation(uri, null
,
BlackBerryContentHandler.
ID_MEDIA_CONTENT_HANDLER
);
// Get the registry object
Registry registry = Registry
.getRegistry(
"aw.myproject.screens.TaskDetailsScreen"
);
try
{
boolean
result = registry.invoke(invocation);
Logger.getLogger().debug(
"invocation " + invocation.getURL() + " result "
+ result);
}
catch (IllegalArgumentException e) {
Logger.getLogger().error(
"invocation error "
+ e.getMessage());
}
catch (ContentHandlerException e) {
Logger.getLogger().error(
"invocation error "
+ e.getMessage());
}
catch (SecurityException e) {
Logger.getLogger().error(
"invocation error "
+ e.getMessage());
}
catch (IOException e) {
Logger.getLogger().error("invocation error " + e.getMessage());
}
catch (Exception e) {
Logger.getLogger().error(
"invocation error "
+ e.getMessage());
}
What happens is:
When I call this code to play some file for the first time, everything works, a media player instance shows up and plays the file.
Now if I close the media player instance with the escape button, and call the same code again for a different file it also works fine, just as the first time.
Now if I leave the media player instance open, switch to home screen and open my user application again and choose the play another file with the above code, I can see the screen switch to the media player instance very shortly then switch back to my app, file is not played. This other file is valid as I could still use media player application to navigate to the file location and play it.
please help with my problem to play another file.
Thanks
Shortcut Navigation
Copyright © 2009 Research In Motion Limited, unless otherwise noted.





