Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

ShareUI

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia N950, Nokia N9
Compatibility
Platform(s): Meego Harmattan
Article
Keywords: ShareUI
Created: Slocan (29 Nov 2011)
Last edited: hamishwillee (13 Jun 2012)

Code snippet demonstrating use of the Share UI Interface on Meego Harmattan from a Pyside application.This allows to open the "Share" interface from your own application.

Code Snippet

import dbus
import urllib
 
bus = dbus.SessionBus()
# Get the Dbus ShareUI object
shareService = bus.get_object('com.nokia.ShareUi', '/')
# Get the share method from the Dbus interface so it can be called later
share = shareService.get_dbus_method('share', 'com.nokia.maemo.meegotouch.ShareUiInterface')
 
# Create the item you'd like to share, making sure strings are URLencoded
description = urllib.quote('Support for Nokia Developers')
title = urllib.quote('Nokia developer')
link = urllib.quote('http://developer.nokia.com')
 
item = 'data:text/x-url;description=%s;title=%s,%s' %(description, title, link)
 
# Place all the items in a list, and call the share method on the Dbus object
share([item,])

See Also

This page was last modified on 13 June 2012, at 10:58.
225 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×