abranson / rockpool

Pebble client application for Sailfish OS
41 stars 19 forks source link

Bluetooth settings cannot be opened from the GUI #15

Closed rufferson closed 8 years ago

rufferson commented 8 years ago

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).

abranson commented 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.

rufferson commented 8 years ago

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.

rufferson commented 8 years ago

Tested multiple times from various places, looks stable.