Reply
Thread Tools
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6751
Like I said before, I think display is not important and I prefer it like this , with visual notifications

Code:
#!/bin/sh

while true
do
Call=$(/sbin/mcetool --status | grep Call | awk '{print $4}')
Dpkg=$(ps aux | grep dpkg | grep journal | cut -d '-' -f2)

   if [ $Call == "active" ]
    then
dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:1000 uint32:0 string:'x-nokia.internet' string:'' string:'Phone is active now !
Waiting to another circle...' string:'' string:'/usr/share/icons/hicolor/64x64/apps/auto-back-on64.png' uint32:0 > /dev/null
     else
     if [ $Dpkg == "install" ]
      then
dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:1000 uint32:0 string:'x-nokia.internet' string:'' string:'Phone in installation process !
Waiting to another circle...' string:'' string:'/usr/share/icons/hicolor/64x64/apps/auto-back-on64.png' uint32:0 > /dev/null
        else
        bash /opt/N9QTweak/Autowall/auto-back2.sh >/dev/null
     fi
   fi
sleep 21600
done
I thought about something else -> GPS !!! We also need command for checking GPS status on/off, because if you drive with Drive or Waze and it start auto-background changer, it will close all Or checking command specific for Drive and Waze (because we not have another navigation programs).

PS. and also like I said before, I prefer it without mcetools package... In other way I need to change this tweak for users that have inception or open mode and mcetools installed..
Coderus told me that we can try to find command for checking phone status in dbus commands, but I don't know how

PS2. I spoke with Coderus again
Run dbus-monitor and call to yourself. We need to catch the relevant info when phone in active (speaking) mode

Last edited by Schturman; 2013-06-06 at 09:17.
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6752
About GPS...
For now I found one way to check this:
Code:
cat /sys/devices/platform/i2c_omap.3/i2c-3/3-01fa/enable
If 1 = GPS in use, if 0 = GPS not used.
But when you close gps program it can take 1-2 minutes to switch from 1 to 0. I think it not so important for us and we can use it like this:

Code:
#!/bin/sh

while true
do
Call=$(/sbin/mcetool --status | grep Call | awk '{print $4}')
Dpkg=$(ps aux | grep dpkg | grep journal | cut -d '-' -f2)
GPS=$(cat /sys/devices/platform/i2c_omap.3/i2c-3/3-01fa/enable)

   if [ $Call == "active" ]
    then
dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:1000 uint32:0 string:'x-nokia.internet' string:'' string:'Phone is active now !
Waiting to another circle...' string:'' string:'/usr/share/icons/hicolor/64x64/apps/auto-back-on64.png' uint32:0 > /dev/null
     else
     if [ $Dpkg == "install" ]
      then
dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:1000 uint32:0 string:'x-nokia.internet' string:'' string:'Phone in installation process !
Waiting to another circle...' string:'' string:'/usr/share/icons/hicolor/64x64/apps/auto-back-on64.png' uint32:0 > /dev/null
        else
        if [ $GPS == "1" ]
         then
dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:1000 uint32:0 string:'x-nokia.internet' string:'' string:'GPS is active now !
Waiting to another circle...' string:'' string:'/usr/share/icons/hicolor/64x64/apps/auto-back-on64.png' uint32:0 > /dev/null
           else
           bash /opt/N9QTweak/Autowall/auto-back2.sh >/dev/null
        fi
     fi
   fi
sleep 21600
done
 

The Following User Says Thank You to Schturman For This Useful Post:
death_jax's Avatar
Posts: 326 | Thanked: 122 times | Joined on Sep 2012 @ Italy
#6753
Schturman, have you considered also the possibility of being in the middle of a file transfer (or any other operation) through Wi-Fi, bluetooth, SSH, Telnet, etc.?!

Last edited by death_jax; 2013-06-06 at 11:10.
 
MK99's Avatar
Posts: 644 | Thanked: 480 times | Joined on Jul 2012 @ Finland
#6754
Heh, I went to the cycling and i put the Meerun on. And guess what, auto-background had closed it.
Please, add that gps-line too!
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6755
Originally Posted by death_jax View Post
Schturman, have you considered also the possibility of being in the middle of a file transfer (or any other operation) through Wi-Fi, bluetooth, SSH, Telnet, etc.?!
You have SSH access (H-1) and you can transfer what you want via WIFI
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6756
Originally Posted by MK99 View Post
Heh, I went to the cycling and i put the Meerun on. And guess what, auto-background had closed it.
Please, add that gps-line too!
Start Meerun and run this command:
Code:
cat /sys/devices/platform/i2c_omap.3/i2c-3/3-01fa/enable
What output you get ?
 

The Following User Says Thank You to Schturman For This Useful Post:
MK99's Avatar
Posts: 644 | Thanked: 480 times | Joined on Jul 2012 @ Finland
#6757
I get 1.
That cycling was before this message, now i know that.
 

The Following User Says Thank You to MK99 For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6758
Ahhh.. Ok
I have only one problem.. Notification not work when script running from auto-background button... If you run this script directly, it work perfectly.. Will see after repackaging.. maybe some permission problem, don't know...
 
MK99's Avatar
Posts: 644 | Thanked: 480 times | Joined on Jul 2012 @ Finland
#6759
Code:
RM696-21-3_PR_001:~# sh /opt/Refresh/disp.sh
initctl: Unknown job: apps/extended-power-menu
initctl: Unknown job: apps/extended-power-menu
initctl: Unknown job: apps/callrecorder_recorder
initctl: Unknown job: apps/callrecorder_recorder
initctl: Unknown job: apps/callrecorder_phone
initctl: Unknown job: apps/callrecorder_phone
initctl: Unknown job: apps/ringingrestorerd
initctl: Unknown job: apps/ringingrestorerd
/opt/N9QTweak/Autowall/auto-back2.sh: line 179: can't create 0: Permission denied
RM696-21-3_PR_001:~#
Sorry. Line 179 is last "fi" line on me. I have some extra image to move.

Last edited by MK99; 2013-06-06 at 12:27.
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6760
Sorry, don't understand you.. You edited script auto-back2.sh And added some new lines with some another images ?
If yes, try also chmod 4755 to this file.
 
Reply

Tags
hebrew vkb, n9 qtweak, n9 quick tweak, n9 quicktweak, root-ssh


 
Forum Jump


All times are GMT. The time now is 01:23.