What APIs are missing from Harbour?

Stumbled on this topic a bit late, but I would like applications to be able to allow their data to be included in a system backup, just how the bookmarks, contacts and so are backed up.

6 Likes

@ahappyhuman maybe it’s not perfect solution (because it’s not build in system) but the best we have now https://openrepos.net/content/slava/my-backup
You can backup every app you want. Thank to this app you can backup all apps using build in system backup option.

5 Likes

While late to be included in any polls (maybe in the future) what is missing and could come handy for general use and as an assistive technology is speech to text.

Mozilla has an open source project that is supposed to be offline but i have no idea if its usable or if there are any better solutions.

Some bg info, probably outdated, regarding TTS: https://together.jolla.com/question/51564/text-to-speech-tts-service-and-api/?answer=165969#post-id-165969

Have you by any chance looked into this:

No, I haven’t. And now I realized that you were asking about opposite direction to what I was talking about :slight_smile:

1 Like

https://github.com/alphacep/vosk-api (Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node) looks interesting as base for any Speech recognition service.

Rust is the most energy performat object oriented programming language available and now it is supported natively by the Linux Kernel also. However, this claim should be put in a more larger frame in which also running time and memory peak usage get into the scene.

Considering that the peak memory is not a great problem in current smartphones but speed and energy, then Rust is near the C in terms of performances.

Regarding the various threads about oom killer and in particular the sailfish browser, on sfos smartphones peak memory consumption indeed seems to be an issue.

1 Like

FWIW, I don’t really think that Rust is a huge issue for Sailfish OS regarding memory consumption.

Whisperfish (with a database dating from the first days with Go) consumes far under 100MB of RAM in the main view (message views of course depend), while the browser and email apps are consistently above 100MB. We’re also continuously improving that part of Whisperfish :blush:

Either way, I think this is straying quite far from the topic at hand.

3 Likes

I’ve been stripping features and unnecessary things from Whisperfish, but there are a few items that the RPM validator doesn’t like, which are necessary features.

  • Import 'Amber.QrFilter 1.0' is not allowed, used for device linking, and soon username link scanning. Would be good if the QrFilter can be whitelisted. EDIT: commented on the issue.
  • qtmozembed-qt5, we’re using a webview to implement Signal’s captcha upon registration.

Some low-hanging fruit that can probably be easily stabilized:

  • Import 'Sailfish.TextLinking' 1.0, I think that should be pretty stable
  • Import 'Nemo.Time 1.0', for displaying a clock

After that, there are a bunch of APIs that we’re using which are way less trivial; I’ll get back to those when I have a clearer opinion.

8 Likes

There is a PR open for allowing that: [harbour-validator] Allow Amber.QrFilter by vige · Pull Request #181 · sailfishos/sdk-harbour-rpmvalidator · GitHub

I would suggest that you could go there and add a comment, perhaps it could be allowed once it becomes obvious that it could really be useful.

8 Likes

Thanks for the link! I’ve done just that. I also commented on the gstreamer issue. I’m quite new to the Harbour process, so please do excuse my ignorance :slight_smile:

EDIT: took the liberty of filing a PR for Nemo.Time; should save Jolla some few minutes of time.

7 Likes

Good progress IMO.

Q: will the documentation pages at API Documentation - Sailfish OS also update through accepting an API, or does someone or something need to be poked for that to happen?

2 Likes

We usually update the API docs there along with major releases.

4 Likes

In pure QML + JS, I can make screenshots and save them as an image file.

Example script snippet
    function commitSave(slot) {
        if ((slot === null ) || (slot < 0 )) {
            _saving = false
            return false
        }
        gameRoot.grabToImage(function(result) {
            if (result) {
                var filename    = "save_" + slot + ".jpg"
                var dir         = StandardPaths.data
                result.saveToFile(dir + "/" + filename)
                Components.SaveManager.commitSave(filename)
            }
            _saving = false
        }, Qt.size(thumbWidth, thumbHeight))
    }

/*
This function can create any number of files. It can be as much as can fit within the storage of the device, or as much as the OS will allow me to use.
Realistically, there will be less than 20, and they are reduced in size, and tens of KB in size each. But in another app, it could be different.
*/

There is no way to delete those files in QML + JS.

So, I have 3 options:

  • Accept orphaned files
  • Add another language to my app
  • Don’t be harbour compliant.

All 3 options are bad for me or this app.
So, something I can use to delete files I can create would be very helpful.

2 Likes

I was using the Sailfish Secrets and Crypto library, but I am getting errors with the harbour check.

If I read the community, this is because the Secrets library is not stable, and I can confirm I sometimes get errors: Failed to retrieve secret: “Password Agent was unable to verify the authenticity of the user”.

Am I correct? Will Secrets become stable soon and pass harbour check?

The Sailfish Secrets framework has been allowed in Harbour since 2023.

1 Like

Thank you.

I got the error while running sfdk check -s harbour path/to/package.rpm, but will revert back my code to using Secrets again.