[Automotive] appman IPC communication from System UI to app?
Nedim Hadzic
nedim.hadzic at pelagicore.com
Thu Sep 15 14:57:05 CEST 2016
Hello Aaron,
It is possible to send signals from System UI to an app. I created one
example for you in the attachment using the System UI example from link you
provided http://doc.qt.io/QtApplicationManager/qml-qtapplicationmanager-
applicationipcmanager.html. I simply added the interface on the application
side to handle triggering 'testSignal' from System UI.
You can also find one example in the music application in the Neptune UI (
https://codereview.qt-project.org/#/admin/projects/qt-apps/neptune-ui).
I hope this helps you and let me know if you have more questions.
Kind regards,
On 15 September 2016 at 00:18, Eiche, Aaron <aeiche at jaguarlandrover.com>
wrote:
> Hi Everyone,
>
> I've been trying to implement IPC via appman (http://doc.qt.io/
> QtApplicationManager/qml-qtapplicationmanager-applicationipcmanager.html)
> in one of our projects. I've managed to get communication going from one of
> our apps to our System UI, but I haven't been able to figure out how to
> implement the opposite direction. I would like to be able to make the
> System UI send information to an application.
>
> Am I missing something obvious here? Is there a practical reason why this
> isn't already implemented (some other method of accomplishing this) or it's
> a bad idea?
>
> thanks
> -Aaron E.
>
> --
> *Aaron Eiche*
> Javascript Developer
>
> *T:* +1.971.256.9731 | *M: *+1.503.334.9164
>
>
>
> Jaguar Land Rover North America, LLC
> 1419 NW 14th Ave, Portland, OR 97209
> JaguarUSA.com <http://www.jaguarusa.com/index.html> | LandRoverUSA.com
> <http://www.landrover.com/us/en/lr/>
>
> _______________________________________________
> Automotive mailing list
> Automotive at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/automotive
>
>
--
Nedim Hadzic
Senior Software Engineer
Pelagicore AG
+49 151 655 666 77
pelagicore.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/automotive/attachments/20160915/af0b739b/attachment.html>
-------------- next part --------------
----------------------------------
SYSTEM UI
----------------------------------
import QtQuick 2.0
import QtApplicationManager 1.0
ApplicationIPCInterface {
id: extension
property bool pbool: true
property double pdouble: 3.14
signal testSignal(string str, variant list)
readonly property var _decltype_testFunction: { "void": [ "int", "string" ] }
function testFunction(foo, bar) {
console.log("testFunction was called: " + foo + " " + bar)
}
Component.onCompleted: {
ApplicationIPCManager.registerInterface(extension, "io.qt.test.interface",
{ "capabilities": [ "media", "camera" ] })
}
}
----------------------------------
APP
----------------------------------
import QtQuick 2.0
import QtApplicationManager 1.0
Item {
id: root
property bool pbool: flase
property Item ipc: Item {
ApplicationInterfaceExtension {
id: interfaceRemoteControl
name: "io.qt.test.interface"
}
Binding { target: interfaceRemoteControl.object; property: "pbool"; value: root.pbool }
Connections {
target: interfaceRemoteControl.object
onTestSignal: {
console.log("testSignal triggered from the SystemUI", str, list)
}
}
}
}
More information about the Automotive
mailing list