![]() |
Help me to code for Sailfish OS
Decided to create one super-thread for all the questions about Sailfish OS coding.
You can post random questions about coding here and help others to code. Sailfish OS only. |
Re: Help me to code for Sailfish OS
Hep
Well... I can start with newbie question...: There is very good software for N9 and now it's source is available github under GPL3... So it is possible port to Sailfish OS... Is there any easy tools for doing that? Yes. I have installed SDK for N9 before and one time to Sailfish too... But don't have any clue how different UI-things are, what to change etc... Link to that software -> https://github.com/baleboy/timesheet Thanks. I use this everyday and one reason why still use N9 and not Sailfish -phone. -- |
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
Quote:
Can you give me little more guidance or is it better use Google? Or just forget and wait if someone else will do it? |
Re: Help me to code for Sailfish OS
Quote:
And of course it's not better to use Google. Try duckduckgo :P |
Re: Help me to code for Sailfish OS
1. do you have example of simple way to get current GPS location.
2. is it possible from native apps to call android share menu? if yes, how? thank you |
Re: Help me to code for Sailfish OS
Quote:
2. https://openrepos.net/content/coderu...dalvik-control |
Re: Help me to code for Sailfish OS
Thanks for this thread - my questions are continual ...
One thing I'm wondering about atm is the newer ApplicationWallpaper.qml. I previously could edit this file pretty easily to customize the bg of apps by just changing "...(0, 0, 0, .65)" line to whatever rgb and opacity values I want. Now, (starting with 3.0, I think), the opacity value still applies as expected, but the color values don't. It seems like it's only black, no matter what rgb values you enter. I figured it has something to do with the other info in the file, (like "effect: "glass" overlayColor: Theme.colorScheme === Theme.DarkOnLight", etc), but I have tweaked with no results. I also get the sense that the ApplicationWindow file plays a role, but it's a bigger file, and can't tell what most of it is referring to... |
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
1 Attachment(s)
/usr/share/lipstick-jolla-home-qt/compositor/ApplicationWallpaper.qml;
previous mod shown in screenshot, from this thread - https://together.jolla.com/question/...odding-system/ I think I remember ApplicationWindow qml is in /usr/lib/qt5/qml/Sailfish/Silica/private |
Re: Help me to code for Sailfish OS
Quote:
Code:
import QtQuick 2.2 |
Re: Help me to code for Sailfish OS
2 Attachment(s)
Quote:
For me, the 1.0 opacity works properly, but the bg ends up being black. 121518 rgb color should be a flat, dark navy-bluish color, (like the previous screenshot). Also, I can tell something's funny, because when I slowly swipe from the side, (as if to peek), it goes straight from black to totally transparent, with no fade, (whereas the normal behavior is a steady fade from the open app to the home screen) |
Re: Help me to code for Sailfish OS
screenshot came out funky in last attachment - in reality it was a solid black background on the settings app...
|
Re: Help me to code for Sailfish OS
1 Attachment(s)
as i said works like you described, check attach
|
Re: Help me to code for Sailfish OS
Quote:
Thanks |
Re: Help me to code for Sailfish OS
Hello guys, about coding, I have latest SDK 2.2.4. When I try to debug with gdb everything seems to work, except I does not have loaded correct symbols. Unfortunately there is a LOT of information about gdb, but I do not undestand them completely..
I can easily reproduce the problem and the memory address is always the same, journactl points to libQt5Quick.so.5.6.3 Code:
segfault at 4 ip 6fae6efa sp 77ae7c30 error 4 in libQt5Quick.so.5.6.3[6fa05000+264000] Code:
0x6fb90efa 8b 77 04 mov 0x4 (%edi),%esi Thank you a lot |
Re: Help me to code for Sailfish OS
Quote:
What's the component that you are missing symbols on? |
Re: Help me to code for Sailfish OS
Quote:
Where could I find out on which component it is failing ? From what I have said it seems to be QtQuick 2.6 (it was 2.2 before, same crash) |
Re: Help me to code for Sailfish OS
I'm trying to listen for a call from a specific phone number to act upon. It seems almost trivial to make in QtQuick, analogous to how PhoneHook handles it:
QML: Code:
DBusInterface { Code:
DBusInterface { But this method is ugly, and isn't reliable because it seems the (correct) lineId isn't always immediately available when an incoming call arrives. So, is this a bug in the DBusInterface plug-in, or am I missing something? |
Re: Help me to code for Sailfish OS
To follow up my own question: I just noticed PhoneHook uses the empty string as service, whereas I used org.nemomobile.voicecall. According to the Qt documentation: "The arguments service and path can be empty, denoting a connection to any signal of the (interface, name) pair, from any remote application."
So, I tried to use Code:
DBusInterface { Also, DBusInterface has an undocumented property watchServiceStatus. This however seems irrelevant, as the service org.nemomobile.voicecall is already available, just not the /calls/active path. |
Re: Help me to code for Sailfish OS
Fuzzillogic, why you dont c++ this stuff?
|
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
is phonehook using qml for this? can you point me to code?
|
Re: Help me to code for Sailfish OS
Phonehook uses C++/Qt for this. Source. But as far as I can gather, this dbus connection there is set up at a time the /calls/active path doesn't exist. That path only exists when there actually is an active call. It seems the Qt-code can handle this, but Nemo's DBusInterface can't.
|
Re: Help me to code for Sailfish OS
Is it possible to copy selected text in SilicaWebView to the clipboard? The text is in an iframe, so I cannot do this by injecting JavaScript.
|
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
Hi out there!
Being a total newbie with nearly every part of the SFOS development universe (i.e. Silica, QML, qt, Python, C++ - I did some webdev with SQL, HTML, PHP, JavaScript, ect. in the past), I would like to create a SFOS-app to control some hardware devices. The latter can done by WIFI and web-APIs (mostly sending HTTP-POSTs and caring for JSON responses) for which there are open source libraries available in Python and JavaScript (many of them using Node.js). The app should provide a simple GUI to control the devices (some buttons) and to display device states at last. After reading a lot and taking my first steps with the SFOS IDE, a few questions remain yet: 1. Which way would you go: Qt Quick including Python libraries or Qt Quick (QML only?) including JavaScript libraries? And why would you do so? 2. How do I integrate avalible Python- or JavaScript libraries into my own projects correctly (especially JS-libs using Node.js) and what has to be taken care of doing so? 3. What do I have to take into account regarding the licenses of the libraries? 4. As SFOS (unfortunately) is a not very widespread plattform, I consider publishing the app for other plattforms (iOS, Android), too (starting with the sailfish version using the SFOS IDE). How can this be achieved in the most effective way? Thanks in advance and greetings, BGK |
Re: Help me to code for Sailfish OS
|
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
1 Attachment(s)
Quote:
EDIT: Well I have overlooked it, at https://doc.qt.io/qt-5/qml-qtquick-listview.html Quote:
EDIT2: since these buttons are not anyhow dynamic I have recreated SilicaListView and ListItems to Row and Rectangles and it fits. |
Re: Help me to code for Sailfish OS
1 Attachment(s)
Three more questions:
1. I would like to navigate from the first page of an app (page 1) to another by swiping left (page 2). GPSInfo does this by using a timer which creates the pageStack.pushAttached element of the second page. Is there another / more elegant way to achieve this behaviour of changing from one to another page? 2. Is it possible to navigate from one pages button (page 1) to another page (page 3) and scroll this one to a specific item (for example a label) in the middle of this page (like anchors in HTML)? 3. Is it possible to use QLM's transform.matrix4x4 within sailfish apps to transform this element (for example to mirror a text field vertically)? |
Re: Help me to code for Sailfish OS
1. PageStack is stack, it's linear. You should have a page under your depth to go lower.
2. You can pass any arguments to a page you pushing to. Process it inside page to scroll 3. You can use transform property: https://doc.qt.io/qt-5/qml-qtquick-i...transform-prop |
Re: Help me to code for Sailfish OS
Thanks for your helpful tips, coderus!
Quote:
Quote:
Quote:
|
Re: Help me to code for Sailfish OS
1. okay, then attachedPage is your choice. Or use a Dialog instead of a Page and set acceptDestination
2. By using https://doc.qt.io/qt-5/qml-qtquick-l...AtIndex-method |
Re: Help me to code for Sailfish OS
Quote:
Quote:
|
Re: Help me to code for Sailfish OS
There could be problems with transitions., Try it out and see. New API introduced pageStack.completeAnimation() method, which is probably you want to call before pageStack.pushAttached
|
Re: Help me to code for Sailfish OS
|
Re: Help me to code for Sailfish OS
I think this code should still work: https://bitbucket.org/mitakuuluu/mit...atarPicker.qml
|
Re: Help me to code for Sailfish OS
Hi,
How to add a short vibration to a Rectangle Button?, thanks, . . |
Re: Help me to code for Sailfish OS
Quote:
Code:
import QtFeedback 5.0 |
All times are GMT. The time now is 09:04. |
vBulletin® Version 3.8.8