You Are Here:

Community: Developer Discussion Boards

#1 Old Wink Invoking the default player. - 2006-02-06, 09:11

Join Date: Oct 2004
Posts: 18
anxamobile
Offline
Registered User
Hi!

Is there a way or is it possible to invoke the default media player of a device (phone)? If so, how?

Thanks!!
Reply With Quote

#2 Old Re: Invoking the default player. - 2006-02-07, 09:44

Join Date: Oct 2004
Posts: 29
Emmanuel Raulo
Offline
Registered User
This is supposedly against the sandbox principle to let the KVM interact with native software on the phone but it seems to me there was a way for a MIDlet to launch the browser for a certain URL so maybe that can be used to launch the video player using a URL that ends with .3gp...

OK, 'found it: MIDlet.platformRequest(URL)

I never tried this myself but please let me know if it helps.
Reply With Quote

#3 Old Re: Invoking the default player. - 2006-02-08, 05:16

Join Date: Oct 2004
Posts: 18
anxamobile
Offline
Registered User
Hi!
I tried it using the code snippet below;

<midletName>.platformRequest("http://java.sun.com/products/java-media/mma/media/test-mpeg.mpg");

and the MIDlet suite invokes the device's browser.

However, when I tried it using a local file (a file included in the jar file), nothing happened. Here's my code;

<midletName>.platformRequest("file:///test.3gp");

and I also tried this line;

<midletName>.platformRequest("/test.3gp");

Anyway, thanks for replying to this thread.
Reply With Quote

#4 Old Re: Invoking the default player. - 2006-02-08, 09:23

Join Date: Oct 2004
Posts: 29
Emmanuel Raulo
Offline
Registered User
A resource indicator starting with file:// identifies a file on the local file system.
You can try resource:///test.3gp but I think the native browser will not be able to handle the URL as it has no access to the JAR, logically.
Maybe you should have your app copy the file on the local file system before invoking the browser with a file:// URI.
Next week I'll give a try to HTTP, which might work arround my pb with 6680 and N90...
Reply With Quote

#5 Old Smile Re: Invoking the default player. - 2006-02-16, 11:38

Join Date: Oct 2004
Posts: 29
Emmanuel Raulo
Offline
Registered User
That was late but I gave a try to playback over HTTP and it works !!! :)
(or at least on 3230)

My URL does not end with .3gp because my contents are served by a PHP script so it's something like http://my.server.com/content.php?ID=xx. Instead I correctly set the Content-type: HTTP header and the native browser was able to handle it.

The "problem" now is that one has to close the native player, close the white browser page and close the browser application before being able to return to my MIDlet (one could hold the application key to switch to the right task but the average user won't do that).
Maybe I can get rid of the white browser page by removing the Content-Disposition: attachment; filename="video.3gp" HTTP header

Hey, sometimes those sweet little mobiles just work ! :)
Reply With Quote

#6 Old Re: Invoking the default player. - 2006-02-17, 03:34

Join Date: Oct 2004
Posts: 18
anxamobile
Offline
Registered User
Yes, exactly what happened when I tested it. The device invoked its native browser to download the file. When it's done, it invokes the native player and then play the file. The user has to explicitly choose the midlet from the 'taskbar' to return to it. It's kind of not user-friendly right?

Anyway, I have a little question to ask. On the initDisplayMode method of VideoControl, I used USE_DIRECT_VIDEO as the first argument, and 'this' to refer to my current object in order to play it using the current canvas. Now, what if I want another canvas to be able to display the video, can I just pass a reference of that canvas as a second argument to initDisplayMode method? For example;

public initPlayer(Canvas canvas) {
/*some initialization here */
videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, canvas);
}

I am using this implementation so that I can have a specialized class which its job is video initialization and playback. It will not be a subclass of Canvas. And other classes (maybe subclass of Canvas) can just call it to play the video file.

Thanks!
Reply With Quote

#7 Old Re: Invoking the default player. - 2006-02-25, 11:50

Join Date: Jan 2006
Posts: 14
bhagwatr's Avatar
bhagwatr
Offline
Registered User
Yes there is a way to invoke default application in other application
Methods are given in this pdf S60_Platform_Utilizing_External_Application_Views_v2_0_en.pdf
just get it from forum.nokia site.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Query OS for default video player? chriscammacr Symbian Media (Graphics & Sounds) 2 2005-08-29 08:42
Player does not support playing back other format-audio than default format? williampresent Mobile Java Media (Graphics & Sounds) 0 2005-08-09 10:14
how to set new video player to the default player rj55 General Symbian C++ 1 2005-06-16 13:15
change the default real player? lior_zilberg General Symbian C++ 0 2005-03-02 10:28
Setting default APN for RealOne Player soniatm Symbian Networking & Messaging 1 2003-11-02 22:10

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ