| The Following User Says Thank You to anig For This Useful Post: | ||
|
|
2018-07-23
, 10:11
|
|
|
Posts: 433 |
Thanked: 726 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#2
|
dbus-send --session --dest=com.jolla.ambienced --type=method_call /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/flow/flow.ambience"
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
|
|
2018-07-23
, 13:21
|
|
Posts: 90 |
Thanked: 163 times |
Joined on Jan 2012
|
#3
|
This has already been partially answered but on TJC; https://together.jolla.com/question/...mbient-change/
Example (assumes you have "Flow" ambience installed and set as a favourite);
But I have no idea how to incorporate this into QML, not without some research!Code:dbus-send --session --dest=com.jolla.ambienced --type=method_call /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/flow/flow.ambience"
|
|
2018-07-23
, 14:50
|
|
|
Posts: 433 |
Thanked: 726 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#4
|
Thanks but that is to set an ambience. Which I can do. What I want to do is change the favorites. This defines which ambiences are available when you swipe down to lock the screen.
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
|
|
2018-07-23
, 15:42
|
|
|
Posts: 835 |
Thanked: 2,424 times |
Joined on Feb 2012
@ Germany
|
#5
|
The last argument is an array of dicts, a{sv}, how can I send that using the typedcall method in qml?
Thanks.
var valueVariant = true;
dbif.typedCall('SetProperty', [
{'type':'s', 'value': 'favorite'},
{'type':'v', 'value': valueVariant}
]);
| The Following User Says Thank You to Halftux For This Useful Post: | ||
|
|
2018-07-23
, 19:28
|
|
Posts: 339 |
Thanked: 1,622 times |
Joined on Oct 2013
@ France
|
#6
|
onClicked: ambienceModel.setProperty(powerMenu.currentIndex, "favorite", false)
| The Following User Says Thank You to Zeta For This Useful Post: | ||
|
|
2018-07-24
, 06:42
|
|
Posts: 90 |
Thanked: 163 times |
Joined on Jan 2012
|
#7
|
| The Following User Says Thank You to anig For This Useful Post: | ||
|
|
2018-07-24
, 07:55
|
|
|
Posts: 835 |
Thanked: 2,424 times |
Joined on Feb 2012
@ Germany
|
#8
|
| The Following User Says Thank You to Halftux For This Useful Post: | ||
|
|
2018-07-24
, 10:23
|
|
|
Posts: 6,431 |
Thanked: 12,683 times |
Joined on Nov 2011
@ Open Mobile Platform, Innopolis, Russia
|
#9
|
Thanks for the responses. I've tried many different permutations including the one above but they don't work.
I initially did try using AmbienceModel but it kept giving me an qsqlerror about could not open database, out of memory. I don't think it is a genuine out of memory issue but actually because the ambience database is a priviliged one. That is why I tried to then use dbus.
|
|
2018-07-26
, 05:20
|
|
Posts: 90 |
Thanked: 163 times |
Joined on Jan 2012
|
#10
|
| The Following 3 Users Say Thank You to anig For This Useful Post: | ||
![]() |
| Tags |
| ambience, dbus-qml |
| Thread Tools | |
|
method call time=1532323566.490406 sender=:1.384 -> d
estination=com.jolla.ambienced serial=27 path=/com/jo
lla/ambienced; interface=com.jolla.ambienced; member=
saveAttributes
int32 1
int64 7
array [
dict entry(
string "favorite"
variant boolean true
)
]
The last argument is an array of dicts, a{sv}, how can I send that using the typedcall method in qml?
Thanks.