From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia N950, Nokia N9
Platform(s): Meego Harmattan
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

See Also

This page was last modified on 13 June 2012, at 10:58.
81 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.