×
Namespaces

Variants
Actions

如何在Harmattan上调用Ovi商店

From Nokia Developer Wiki
Jump to: navigation, search

本文解释如何从Harmattan调用Ovi商店

方法一

AdConnector makes use of D-Bus to launch the harmattan ovi store clientHere is the code:

void OviStoreHandlerPrivate::launchOviStore(const QStringList &args){
Q_UNUSED(args);
qDebug() << "OviStoreHandlerPrivate::launchOviStore " << args;
QDBusInterface iface("com.nokia.OviStoreClient", "/com/nokia/OviStoreClient", "com.nokia.OviStoreClient", QDBusConnection::sessionBus());
if (iface.isValid())
{
QDBusReply<QString> reply = iface.call("LaunchWithLink",args[0]);
return;
}
}

方法二

If you want to do it from QML there is also a more lightweight solution:

Qt.openUrlExternally("http://store.ovi.com/content/160871");

Qt detects that it is an ovi store url and actually launches the OviStore application instead of the browser.


相关链接


Article Metadata

文章
flycarl 在 02 Sep 2011 创建
最后由 hamishwillee 在 13 Jun 2012 编辑
This page was last modified on 13 June 2012, at 13:58.
37 page views in the last 30 days.