void ApplicationUI::invoke(QString platform) { // Create a new invocation request InvokeRequest request; if (platform == "BBM") { request.setAction("bb.action.BBMCHAT"); request.setUri("pin:2B1F7E7B"); request.setTarget("sys.bbm.sharehandler"); } if (platform == "EMAIL") { request.setAction("bb.action.COMPOSE"); bb::Application* thisApp; const QString uri = "mailto:[email protected]?subject=" + thisApp->applicationName() + "%20version%20" + thisApp->applicationVersion(); request.setUri(uri); request.setMimeType("text/plain"); request.setData("Test"); request.setTarget("sys.pim.uib.email.hybridcomposer"); } if (platform == "TWITTER") { request.setAction("bb.action.VIEW"); request.setUri("twitter:connect:RodgerLeblanc"); request.setTarget("com.twitter.urihandler"); } if (platform == "BBW") { request.setAction("bb.action.OPEN"); request.setUri("appworld://vendor/70290"); request.setTarget("sys.appworld"); } // Start the invocation InvokeManager* invokeManager = new InvokeManager(this); invokeManager->invoke(request); invokeManager->deleteLater(); }
void ApplicationUI::openThisAppInBBW(const QString bbwLink) { InvokeRequest request; request.setAction("bb.action.OPEN"); request.setUri(bbwLink); request.setTarget("sys.appworld"); // Start the invocation InvokeManager* invokeManager = new InvokeManager(this); invokeManager->invoke(request); invokeManager->deleteLater(); }