×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Sep 2010
    Posts
    76

    Open media using system default app.

    Hi, I want to open file such .png, .mp3, .txt, .3gp and many more using phone default app, something similer to QDesktopServices. What api I can use to help me achieve that?

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Open media using system default app.

    RApaLsSession would be one good choice

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Open media using system default app.

    You can also check CDocumentHandler.

  4. #4
    Regular Contributor
    Join Date
    Sep 2010
    Posts
    76

    Re: Open media using system default app.

    I tried RApaLsSession and it work fine and able to open common file without any problem, but I got another problem when I tried to open a .htm file; it did open but when I click the link it response with "No Gateway Reply". Any idea why?

    At the mean time I'll take a look at CDocumentHandler to compare which one is better.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Open media using system default app.

    Quote Originally Posted by farewellwish View Post
    I tried RApaLsSession and it work fine and able to open common file without any problem, but I got another problem when I tried to open a .htm file; it did open but when I click the link it response with "No Gateway Reply". Any idea why?
    Make sure that you can access the Internet with the browser. If it does not work in itself, it will not work in cooperation with your application either.

  6. #6
    Regular Contributor
    Join Date
    Sep 2010
    Posts
    76

    Re: Open media using system default app.

    Quote Originally Posted by wizard_hu_ View Post
    Make sure that you can access the Internet with the browser. If it does not work in itself, it will not work in cooperation with your application either.
    I can access the internet just fine, but I don't think I need it. Because the .htm file I open didn't really need internet access, the link I click just link different part of the same .htm file.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Open media using system default app.

    For testing purposes you can also try opening the same file via the File Manager. Personally I expect the same behavior, so it is not related/restricted to these API-s in my opinion. You can experiment with varying the reference format in the HTML document and/or checking the browser board (you can easily find it from the "root", http://discussion.forum.nokia.com)

  8. #8
    Regular Contributor
    Join Date
    Sep 2010
    Posts
    76

    Re: Open media using system default app.

    It work fine when I use Y-Browser or the phone default File Manager when I open it. Following is the .htm file I was opening.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <title>Help File</title>
    <style>
    body, td, p {
    	font-family:Arial, Helvetica, sans-serif;
    	font-size:11px;
    }
    .title {
    	font:Arial, Helvetica, sans-serif;
    	font-size:12px;
    	font-weight:bold;
    }	
    	</style>
    </head>
    
    <body>
    <span class="title">Hello and welcome to test help file.</span><br>
    <br>
    <span class="title"><a name=100 id=100></a>【Help Index】 </span><br>
    <span class="title"><a href="#ONE">111111111</a></span><br>
    <span class="title"><a href="#TWO">222222222</a></span><br>
    <span class="title"><a href="#THREE">333333333</a></span><br>
    <br>
    <span class="title" id="ONE">111111111 </span><br>
    <span>1</span><br>
    <span><a href="#100">Back to Index</a></span><br>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <br>
    <span class="title" id="TWO">222222222</span><br>
    <span>2</span><br>
    <span><a href="#100">Back to Index</a></span><br>
    <br>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <span class="title" id="THREE">333333333</span><br>
    <span>3</span><br>
    <span><a href="#100">Back to Index</a></span><br>
    <br>
    </body>
    </html>

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Open media using system default app.

    Y-Browser is actually developed by Symbianyucca, so you can ask him what API he uses. It is probably going to be RApaLsSession or CDocumentHandler though.

  10. #10
    Regular Contributor
    Join Date
    Sep 2010
    Posts
    76

    Re: Open media using system default app.

    Symbianyucca can you help me here, I don't think I have any problem with the code on opening the file, so is it possible be capability or UID problem?

  11. #11
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Open media using system default app.

    I'm not having the codes on this computer so an not check anything, anyway, if it is the self-signed version, then you could try using the self-signed capabilities (location not included), I'm rater sure I'm using RApaLsSession there, though could check it later when I switch to the other laptop.

Similar Threads

  1. How to play media file in System media player in j2me????
    By mohammad_kaied in forum Mobile Java Media (Graphics & Sounds)
    Replies: 14
    Last Post: 2014-05-25, 14:57
  2. How to open mp3 file use my App as default?
    By Maksim85 in forum Symbian
    Replies: 10
    Last Post: 2010-10-09, 07:01
  3. How to open media File use my App as default?
    By IsGoldenFinger in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2007-08-31, 11:12
  4. Using Player without system copying media to temporary directory?
    By BenjaminDelarre in forum Mobile Java General
    Replies: 0
    Last Post: 2006-01-11, 17:56
  5. Playing media using APN and proxy defined by the app
    By suckho in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2005-07-13, 07:24

Posting Permissions

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