Closed rufferson closed 8 years ago
It looks like that in addition to the jolla-settings -prelaunch and the dbus call on that page, it's being launched with the invoker. This seems reliable on my phone:
sh -c "/usr/bin/invoker --type=qt5 /usr/bin/jolla-settings -prestart &" && sleep 1 && dbus-send --type=method_call --dest=com.jolla.settings /com/jolla/settings/ui com.jolla.settings.ui.showPage string:"system_settings/connectivity/bluetooth"
Edit: no, that leaves the invoker running. I think the mismatch is in the launching though definitely. The DBus call is correct.
Seems org.nemomobile.lipstick /LauncherModel org.nemomobile.lipstick.LauncherModel.notifyLaunching(string:"jolla-settings.desktop") followed by com.jolla.settings /com/jolla/settings/ui com.jolla.settings.ui.showPage(string:"system_settings/connectivity/bluetooth") is sufficiently reliable when later is called in a callback to former's result handler. Committed a fix where BT is called using QML DBus nemomobile plugin, will see how it goes.
Tested multiple times from various places, looks stable.
There are buttons in the GUI to open Bluetooth settings when Pebble is disconnected. Those buttons are still referencing to Ubuntu's settings://system/bluetooth scheme which doesn't work in Sailfish. Potentially need to implement method suggested here - https://together.jolla.com/question/126841/question-how-to-start-qml-file-from-cli/ - however I cannot yet reach reliable results (eg. as it works from notification quick launcher).