×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    25

    Opening a default application based upon Mime type?

    Hi,

    I have just started to develop within Nokia Qt and I would like to how it is possible to do the following.

    1. Create an application that will launch the default application based upon the Mime type of the file?
    2. Create an application that registers itself as the default application to open a certain mime type.
    3. Use the application from 2. to handle the mime type and open the file.

    So far I have only been able to find the documentation to do this using the Symbian C++ platform only. I think following these guides would achieve what I want to do, although I am not sure :


    This leads me towards some more general questions, which I would really appreciate answering.
    4. Within Nokia Qt is it possible to write Symbian specific code? If so, do I need set-up a Symbian SDK / Development Environment and just include the specific libraries that I require? Or do I require something else?

    Thanks in advance for any help!

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Opening a default application based upon Mime type?


  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    25

    Re: Opening a default application based upon Mime type?

    Ah thank you. Just to clarify so that I don't do anything stupid, I should be able to use the setUrlHandler within the other application to register it as the default application to open the mime type.
    Then when I want to open that mime type I should be able to use the openUrl to open the currently set handler.

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Opening a default application based upon Mime type?

    UrlHandler has an effect only in scope of application.
    Last edited by divanov; 2011-02-11 at 13:59. Reason: typos

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    25

    Re: Opening a default application based upon Mime type?

    Huh, I am a bit confused by what you mean there. I am used to the magic of J2ME's CHAPI JSR. I was really looking for some sort of equivalent. When you say in scope of application, do you mean the other application needs to be already opened. How would this work if the other application is closed.

    Perhaps you could explain the void QDesktopServices::setUrlHandler ( const QString & scheme, QObject * receiver, const char * method ) [static] function more. More specifically the pointer to the receiver object. Do you create the application and get a pointer to it?
    Last edited by gbrownaccount; 2011-02-11 at 13:44. Reason: Grammer

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Opening a default application based upon Mime type?

    QObject is the object inside of your application which will be handling open requests for specified scheme. If you need to change associations on the system level, then you should use Symbian native API for that.

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    25

    Re: Opening a default application based upon Mime type?

    Oh, Well back to my very first post :

    4. Within Nokia Qt is it possible to write Symbian specific code? If so, do I need set-up a Symbian SDK / Development Environment and just include the specific libraries that I require? Or do I require something else?

  8. #8
    Registered User
    Join Date
    Oct 2010
    Posts
    25

    Re: Opening a default application based upon Mime type?

    Don't worry. I am playing around with one of the Qt examples here. Thanks for your help. I will create a seperate thread when I get issues using the Symbian code.
    Last edited by gbrownaccount; 2011-02-11 at 16:10.

  9. #9
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Opening a default application based upon Mime type?

    Quote Originally Posted by gbrownaccount View Post
    Within Nokia Qt is it possible to write Symbian specific code? If so, do I need set-up a Symbian SDK / Development Environment and just include the specific libraries that I require? Or do I require something else?
    Since Qt is library you can use native Symbian libraries together with it. However, Qt SDK doesn't contain headers for all Symbian libraries, so you may need Symbian SDK in certain cases.

Similar Threads

  1. Replies: 2
    Last Post: 2009-05-12, 14:00
  2. default MIME type launcher
    By EranNoyman in forum Symbian
    Replies: 0
    Last Post: 2003-05-01, 07:33
  3. Replies: 1
    Last Post: 2002-05-10, 18:59

Posting Permissions

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