Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User conxt's Avatar
    Join Date
    Nov 2011
    Posts
    48
    Hello,

    I am using MNotification to show a banner. Now I want a file to be opened when a user taps the banner.

    MNotification insists on using MRemoteAction D-Bus call. I, instead, would like to use Qt.openUrlExternally(). To do so I try to connect MRemoteAction::triggered() signal to a custom slot. The connection returns true (success) as well as my D-Bus call is being properly executed. But the problem is that my slot never gains control as if triggered() was never emitted.

    Maybe there is some other workaround to call Qt.openUrlExternally() through MRemoteAction object?
    Thanks!

  2. #2
    Registered User kusumk's Avatar
    Join Date
    Sep 2011
    Posts
    449
    Hi,

    Can you please check https://gitorious.org/libharmattanev...venttester.cpp
    http://www.d-pointer.com/solutions/l...ttaneventview/

    setUrlToOpen api also helps in achieving the same.

  3. #3
    Registered User conxt's Avatar
    Join Date
    Nov 2011
    Posts
    48
    kusumk: thank you for your reply but unfortunately this is not the case.
    In fact, MNotification forces the use of D-Bus and I am looking for a way to open a .png file with appropriate application (Gallery) with D-Bus

  4. #4
    Registered User kusumk's Avatar
    Join Date
    Sep 2011
    Posts
    449
    Hi,

    Did you check the libcontentaction apis for doing the same instead of using dbus -

    http://harmattan-dev.nokia.com/docs/...50ZW50YWN0aW9u

    Please check Action class reference.

  5. #5
    Registered User conxt's Avatar
    Join Date
    Nov 2011
    Posts
    48
    Apparently there was a reason for MNotification to force D-Bus usage because a banner is a part of system process, not my process (which explains why signal did not reach the slot).
    So I ended up with implementing a simple D-Bus adaptor which appeared totally fine since the banner can show up only when my app is still running.

    Anyway, kusumk, thank you very much for your help!
    Last edited by conxt; 2012-01-11 at 10:46.

  6. #6
    Registered User kusumk's Avatar
    Join Date
    Sep 2011
    Posts
    449
    Conxt,

    >> 'I am looking for a way to open a .png file with appropriate application (Gallery) with D-Bus '

    So were you successful in doing the above.

  7. #7
    Registered User conxt's Avatar
    Join Date
    Nov 2011
    Posts
    48
    Yes, I came to exporting a D-Bus adaptor with QDesktopServices::openUrl and everything seems to work fine.
    Sure it seems quite redundant to create an adaptor for a single line of code, but, as I have said, there seems to be a reason for this.

    Thank you!

  8. #8
    Registered User tanty0's Avatar
    Join Date
    Dec 2011
    Posts
    3
    You can use dbus-send through the (unsupported, I think) maemo-meegotouch-interfaces package.

    For example, in the case of Gallery, I was succesfully able to use the following calls:

    Opening a list of files in the grid:

    dbus-send --print-reply --dest=com.nokia.Gallery --type=method_call \
    / com.nokia.maemo.meegotouch.GalleryInterface.showMediaInGrid \
    array:string:"file:///home/user/MyDocs/DCIM/picture-1.jpg","file:///home/user/MyDocs/DCIM/picture-2.jpg"

    Opening a list of files in fullscreen:

    dbus-send --print-reply --dest=com.nokia.Gallery --type=method_call \
    / com.nokia.maemo.meegotouch.GalleryInterface.showMediaInFullScreen \
    array:string:"file:///home/user/MyDocs/DCIM/picture-1.jpg","file:///home/user/MyDocs/DCIM/picture-2.jpg"

    Opening gallery in the CameraRoll tab:

    dbus-send --print-reply --dest=com.nokia.Gallery --type=method_call \
    / com.nokia.maemo.meegotouch.GalleryInterface.showCameraRoll

    Anyway, don't expect this to keep working in future SSUs.

Similar Threads

  1. MBanner / MNotification
    By avisheksomani in forum Nokia N9
    Replies: 5
    Last Post: 2011-07-23, 14:13
  2. Replies: 10
    Last Post: 2010-11-23, 16:15
  3. Replies: 4
    Last Post: 2010-03-01, 09:51
  4. Open some specified SMS/MMS message from inbox to open a thrid-party application
    By Mark070508 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2009-12-10, 07:46
  5. Replies: 1
    Last Post: 2008-01-09, 20:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved