Reply
Thread Tools
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#11
Originally Posted by kimmoli View Post
crap... How i can cast uint32 inside QML ...
Guys, as pycage said, if you are developing a QML Sailfish program then there's the nemo-qml-plugin-notifications API which is the one you should use. (Not sure where the documentation for that is).

This thread is for tinkering.

Originally Posted by junnuvi View Post
Does anyone know if there is possibility to add sounds for those notifications? Or should that been added seperately?
Yes but via notification categories. Not sure where the documentation for that is either, but you can see examples in /usr/share/lipstick/notificationcategories/
 

The Following 5 Users Say Thank You to javispedro For This Useful Post:
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#12
I'm trying to "abuse" my event screen for showing sports live results with a small pythonscript using lxml and dbus. The script parses every 5 minutes the information and updates the notification, if its already there, otherwise adds a new notification. Then the script sleeps for another 5 minutes and so on.
As long as the screen is on, it's fully functional but if the screen is off the script won't update. It seems that the jolla goes into some kind of sleep state, because when I turn the screen on, the script updates after some time.

Is it a known bug (couldn't find anything on together.jolla.com) or is there anything more to do, if I want to use dbus, when screen is off?
 
kimmoli's Avatar
Posts: 562 | Thanked: 2,744 times | Joined on Dec 2013 @ Espoo, Finland
#13
Jolla takes a deep sleeps, and timers are running but they run sloooow.
I have 1 second timers which takes sometimes about 2 minutes to trigger.
Your 5 minute timer can be many hours in worst case.

It is possible to trigger timer e.g. every 1s, and check how long time it has gone from the last trigger, if it is about 5 minutes, make your update.

EDIT: Just checked from my logfile, that maximum duration for 1-sec timer was 7 min 32 seconds. But the above approach is maybe accurate enough for updating sports results?

Last edited by kimmoli; 2014-01-09 at 16:43.
 

The Following 2 Users Say Thank You to kimmoli For This Useful Post:
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#14
Originally Posted by kimmoli View Post
Jolla takes a deep sleeps, and timers are running but they run sloooow.
I have 1 second timers which takes sometimes about 2 minutes to trigger.
Your 5 minute timer can be many hours in worst case.

It is possible to trigger timer e.g. every 1s, and check how long time it has gone from the last trigger, if it is about 5 minutes, make your update.
http://talk.maemo.org/showthread.php?t=92183
Few ways to force it to behave normally after screen goes out
 

The Following 3 Users Say Thank You to szopin For This Useful Post:
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#15
Originally Posted by EmaNymton View Post
As long as the screen is on, it's fully functional but if the screen is off the script won't update. It seems that the jolla goes into some kind of sleep state, because when I turn the screen on, the script updates after some time.

Welcome to Android! http://talk.maemo.org/showthread.php?t=92183

This phone is sadly not as friendly to simple scripts as Maemo devices where...
 

The Following User Says Thank You to javispedro For This Useful Post:
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#16
Originally Posted by javispedro View Post
Welcome to Android! http://talk.maemo.org/showthread.php?t=92183

This phone is sadly not as friendly to simple scripts as Maemo devices where...
According to this:
http://www.opendevs.org/iquz/wakeloc...he-kernel.html

Should be: Welcome to linux kernel (3.5+)

edit: (which is weird as uname -a shows 3.4 on Jolla :/)

Last edited by szopin; 2014-01-09 at 16:49.
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#17
Originally Posted by szopin View Post
Should be: Welcome to linux kernel (3.5+)
Both wakelocks and opportunistic suspending are Android only things. (And Windows 8 btw). Even under kernels where suspend blockers is available, Android still presents and uses the wakelocks interface (even if on 3.10 it uses suspend blockers as "backend").
 

The Following User Says Thank You to javispedro For This Useful Post:
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#18
Ouch, this is bad!

Then atm it would be possible to deactive this behavoir when starting my script and reset to "normal" when finishing?

btw. is:
Code:
echo asdf > /sys/power/wake_unlock
the command to reset?
 
Posts: 38 | Thanked: 17 times | Joined on Jun 2008
#19
My jPhone is missing the dbus python module. How did you install it?

>>>import dbus
>>>ImportError: No module named dbus
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#20
Originally Posted by EmaNymton View Post
Ouch, this is bad!

Then atm it would be possible to deactive this behavoir when starting my script and reset to "normal" when finishing?
Well, that, or use on the methods on that thread to just disable the entire thing.

Originally Posted by EmaNymton View Post
is:
Code:
echo asdf > /sys/power/wake_unlock
the command to reset?
Yep.
 

The Following User Says Thank You to javispedro For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:40.