×
Namespaces

Variants
Actions
Revision as of 13:58, 13 June 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ShareUI

From Nokia Developer 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 13:58.
94 page views in the last 30 days.
×