![]() |
Re: SailfishOS 2.0 on Nexus 5
Quote:
Since the file is owned by root:root, it will probably require changing permissions/ownership of that file so that the app can write to it, at least until I can work out how to turn it on the "right way". Seems like the kind of thing libhybris handles, but I couldn't find any info on how to actually use it. Anyone know how? |
Re: SailfishOS 2.0 on Nexus 5
I have never done something like this (and it sounds like the wrong thing to do), but you might be able to add chmod commands to a %post script (don't forget to undo on %postun if it even works) in your rpm spec file to change permissions on installation…
|
Re: SailfishOS 2.0 on Nexus 5
Quote:
I would create a folder called scripts under nemo home directory so you can keep your scripts together. It is not are requirement. Create a file /home/nemo/scripts/flashlight.sh and copy the following to it. Code:
#!/bin/bash Code:
[Desktop Entry] Hope this helps to get you going. Edit: Make sure the script is executable. Code:
chmod 755 /home/nemo/scripts/flashlight.sh |
Re: SailfishOS 2.0 on Nexus 5
@abyzthomas: it works...almost. It doesn't behave like a regular SFOS application, so it's not obvious about how to close it properly. But that's better than nothing. Thanks a lot.
|
Re: SailfishOS 2.0 on Nexus 5
Quote:
Code:
nemo ~ $ ls -l /sys/class/leds/led\:rgb_red/ What are the permissions/ownership of the files on the N5? I haven't actually received mine yet! |
Re: SailfishOS 2.0 on Nexus 5
3 Attachment(s)
So I made an app:
http://i.imgur.com/ZytGbjP.png I don't have a N5 yet so if someone can test for me I'd really appreciate it! RPMs are attached. EDIT: sauce https://github.com/sam-hobbs/harbour-hammerhead-torch EDIT: now on openrepos https://openrepos.net/content/feathe...mmerhead-torch It works fine editing a file in /home/nemo in the emulator, but I can't create the file /sys/class/leds/led:flash_torch/brightness in the emulator which is really annoying! So I think it will work, but it might not. Also, can someone explain what the difference between debug and release modes is in the SDK? I thought release mode just removed debugging symbols or something like that, but I get no errors compiling in debug mode and lots in release mode :confused: |
Re: SailfishOS 2.0 on Nexus 5
Quote:
|
Re: SailfishOS 2.0 on Nexus 5
Quote:
Did you have to change any permissions? Only thing that's bugging me about it is that if you toggle the flashlight from the cover action it won't update the icon when you open the main page and vice versa. On "traditional" Qt I'd do this with signals and slots but it's taking a while to get my head around Qml and the docs aren't great either compared to normal Qt, which is understandable. The best I could do for now is to use onStatusChanged on the main page (see here), but that only works when switching between pages within the app (try main page to about and back, and it will refresh); it doesn't work when switching between the cover and the app itself. Are there any signals for when different pages gain focus or anything like that? |
Re: SailfishOS 2.0 on Nexus 5
Quote:
|
Re: SailfishOS 2.0 on Nexus 5
Quote:
Code:
Image { |
All times are GMT. The time now is 16:15. |
vBulletin® Version 3.8.8