ShareUI
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
- For C++ implementation, please see https://github.com/matyjas/share-bear


Croozeus - Screenshot?
Possible to add a screenshot? for the share interface.
/Pcroozeus 12:37, 1 December 2011 (EET)
Tanlsf - Sample
Could give more complete sample? I've no glue how to integrate in a QT project. Thanks.tanlsf 05:02, 17 December 2011 (EET)