Does Sailfish offer APIs for battery, installed apps enumeration, WiFi and cellular info, etc?
I'm in the progress of porting my existing 'droid app as a native Sailfish QML + QT5 C++ app. I've tried to find a native Sailfish or QT5 API for the following goals, but without a luck so far. As far as I understand, QtMobility is phased out, and QtSystemInfo it not yet implemented. Am I out of luck, or are there some tricks or special ways to achieve these?
- battery properties detection, like current battery charge level, battery temperature (alternative to the green robot OS' BatteryManager)
- installed apps enumeration (alternative to PackageManager.getInstalledPackages)
- WiFi network and connection detection, like SSID, RSSI (alternative to WifiManager)
- cellular network and connection properties, like SIM state, network operator code (alternative to TelephonyManager)
- detection of inserted SD-card state, capacity, available space
Thank you :-)
maybe not everything have such high-level apis, but there are many ways to get that info from device.
coderus ( 2016-06-11 11:58:41 +0300 )editThank you for your reply. Other than poking into /sys/class or /proc, and sadly only finding a subset of the required readings, what other ways would there be to find those information? Especially the list of installed Sailfish apps, which seems to be a really head-scratcher.
Fiery ( 2016-06-11 15:16:07 +0300 )editlearn packagekit api :)
coderus ( 2016-06-11 21:27:42 +0300 )editI'ld write such an app in Python using all the fine tolls provided there. Most of the stuff you want to access is covered by the psutil package.
Eierkopp ( 2016-06-12 12:05:11 +0300 )editThank you for your tips. I'm still hoping (one day, in the future) to see a high-level API, since packagekit, dbus and python all sound too quirky and not generic enough.
Fiery ( 2016-06-12 23:03:42 +0300 )edit