[SailfishDevel] Qt5SystemInfo status

Riku Lahtinen rikul.lajolla at kiu.as
Sat Jan 23 06:56:21 UTC 2016


Thanks for the hints. I ended to dbus solution for two reasons:

1. It is currently supported by Jolla Harbour
2. In my code the CellId update didn't work reliable in QtSystemInfo 
solution. The app did not always update  the cell info when the cell was 
changed. E.g. if you changed the phone from 4G to 2G QtSystemsInfo did 
not change the CellId info like DBus solution.

To get info and examples for dbus coding was not very easy for me. First 
you have to somehow find right services, interfaces and paths and test 
them with dbus-send command with your jolla. Then you are ready to code 
DBusInterface. Still in phase to find right parameters to get wifi SSIDs.

If my DBus code helps some other it can be found from 
, lines 59-79


14.01.2016, 12:17, Oleksii Serdiuk kirjoitti:
> Right, but why reinventing the wheel when there's already the code 
> that does it? :-)
> My plan is to get rid of my workaround as soon as Qt SystemInfo gets 
> whitelisted, so I didn't want to bother writing the code that I will 
> throw away in future.
> On 12/01/16 13:01, Кожевников Андрей Андреевич wrote:
>> you can read /etc/sailfish-version and etc.
>> 12.01.2016 18:00, Oleksii Serdiuk пишет:
>>> Well, just for getting cell info - yes, should be enough to query
>>> ofono(?) through dbus.
>>> For my case, Inned more info, like device model, OS version, etc. So
>>> custom-built libQt5SystemInfo.so.5 is a drop-in replacement until Qt
>>> SystemInfo gets whitelisted: I'll only have to remove it from the RPM
>>> without needing to change anything in my app.
>>> On 12/01/16 12:53, Кожевников Андрей Андреевич wrote:
>>>> In most cases you can fetch information using dbus calls without using
>>>> systeminfo lib.
>>>> 12.01.2016 17:51, Oleksii Serdiuk пишет:
>>>>> I've had a similar issue: I needed Qt SystemInfo to integrate
>>>>> analytics into my app.
>>>>> The recommended way to solve linking against non-whitelisted
>>>>> libraries, is to ship them together with your app. However, just
>>>>> taking libQt5SystemInfo.so.5 from Sailfish repos and putting it into
>>>>> your RPM won't work: it links against other non-whitelisted libraries
>>>>> (namely, SSU, and SSU links further). So my solution was to build a
>>>>> custom version of libQt5SystemInfo.so.5, which excludes
>>>>> non-whitelisted libs.
>>>>> The source for Sailfish version of Qt SystemInfo is available here:
>>>>> https://git.merproject.org/mer-core/qtsystems
>>>>> I don't remember the qmake flags exactly (I can check them when I'm
>>>>> back home, if you need), but I think they were:
>>>>> > qmake CONFIG+=ofono CONFIG+=nox11option
>>>>> This will produce Harbour-compatible version of libQt5SystemInfo.so.5
>>>>> which you can link against and include into you RPM.
>>>>> Or, you can reuse my version of it. It's available here:
>>>>> https://olse.me/taot
>>>>> libQt5SystemInfo.so.5 is in rpm/lib/<arch> folder. You can take a 
>>>>> look
>>>>> at taot.pro (lines 263-264, 278, and 284), rpm/harbour-taot.yaml 
>>>>> (line
>>>>> 44), and rpm/harbour-taot.spec to see how I include the lib into RPM.
>>>>> On 11/01/16 03:29, Riku Lahtinen wrote:
>>>>>> Hi!
>>>>>> I developed an app At Work, which records the time you stay at 
>>>>>> work by
>>>>>> using GPS. Because of the poor GPS functionality in buildings and
>>>>>> response of the app users I added a feature to utilize a cell
>>>>>> information also. For that I needed to import QtSystemInfo 5.0. I 
>>>>>> got
>>>>>> that to work by inserting two lines to spec file and everything
>>>>>> seems to
>>>>>> be working. Though the app doesn't pass the Jolla Harbour rpm check,
>>>>>> because QtSysteminfo is not accepted in the test.
>>>>>> Does anybody know when QtSystemInfo is accepted to be used or are
>>>>>> there
>>>>>> other paths to proceed? I know OpenRepos is one way but I like the
>>>>>> work
>>>>>> they do in Jolla Harbour very much to increase the reliability of 
>>>>>> our
>>>>>> software.
>>>>>> Best Regards
>>>>>> Riku

More information about the Devel mailing list