Page 1 of 9 123456 ... LastLast
Results 1 to 20 of 177
  1.    #1  
    One of the features I liked on my old Treo was the blinking green LED when I had a waiting text message. There's no such functionality out of the box for the Pre.

    With this change, however, the center button LED will illuminate when you have a waiting text message!

    As a prerequisite, you'll need the webosinternals services installed so you can run shell commands from within your application. If you already have this installed (for the my-tether application, for example) you can skip this step.

    As root:

    Code:
    cd /tmp/
    mount -o remount,rw /
    
    wget http://gitorious.org/webos-internals/applications/blobs/raw/db385edfa3f71ceb98401c16dd94b2490bfaaae5/org.webosinternals.services/org.webosinternals.services-0.4_all.ipk
    ipkg install org.webosinternals.services-0.4_all.ipk
    rm org.webosinternals.services-0.4_all.ipk
    Next we'll create the script to turn on the LED:

    Code:
    cd /usr/palm/applications/com.palm.app.messaging/app/
    mkdir scripts
    cd scripts
    In vi or your editor of choice, create the file led_on.sh in the scripts directory:

    Code:
    #!/bin/sh
    sleep 9
    echo 100 >/sys/class/leds/core_navi_center/brightness
    While still in the scripts directory, change the permissions on the file:

    Code:
    chmod 744 led_on.sh
    Now we need to tie our script into the messaging application:

    Code:
    cd /usr/palm/applications/com.palm.app.messaging/app/controllers
    Apply the following patch:

    Code:
    --- notification-assistant.jsjsjs.$bak$       $Mon$ $Jul$  $6$ $14$:$04$:$10$ $2009$
    +++ $notification$-$assistant$.$js$   $Mon$ $Jul$  $6$ $18$:$48$:$17$ $2009$
    @@ -$189$,$7$ +$189$,$15$ @@
            $var$ $dashboard$ = $this$.$controller$.$getStageController$($DashboardMessageStageName$);
    
            $if$ ($dashboard$) {
    +               $var$ $displayOn$ = $this$.$Messaging$.$DisplayState$.$isDisplayOn$();
                    $dashboard$.$delegateToSceneAssistant$(&$quot$;$update$&$quot$;);
    +               $if$ (!$displayOn$) {
    +                       $this$.$controller$.$serviceRequest$('$palm$://$org$.$webosinternals$.$shell$', {
    +                               $method$: '$runCmd$',
    +                               $parameters$: {
    +                                       $cmd$: '/$usr$/$palm$/$applications$/$com$.$palm$.$app$.$messaging$/$app$/$scripts$/$led_on$.$sh$'}
    +                       });
    +               }
            } $else$ {
                    // $Create$ $a$ $dashboard$
                    $var$ $f$ = $function$($stageController$){
    @@ -$214$,$9$ +$222$,$13$ @@
                                    $this$.$isNewMessageDashboardPending$ = $true$;
                                    $createDashboard$.$delay$($5$);
                            }
    -
                    } $else$ {
                            $createDashboard$(); // $if$ $the$ $screen$ $is$ $off$, $create$ $the$ $dashboard$ $right$ $away$
    +                       $this$.$controller$.$serviceRequest$('$palm$://$org$.$webosinternals$.$shell$', {
    +                               $method$: '$runCmd$',
    +                               $parameters$: {
    +                                       $cmd$: '/$usr$/$palm$/$applications$/$com$.$palm$.$app$.$messaging$/$app$/$scripts$/$led_on$.$sh$'}
    +                       });
                    }
            }
     };
    Now lock up the filesystem and reboot:

    Code:
    mount -o remount,ro /
    /sbin/reboot
    More testing and feedback would be appreciated. Only got this working this evening and there may be an unintended side effect or two, but hopefully not <knock on wood>.
    Last edited by Keegan99; 07/07/2009 at 10:57 AM.
  2. as4life's Avatar
    Posts
    577 Posts
    Global Posts
    733 Global Posts
    #2  
    i will definitely try this Thanks!
  3. #3  
    ok... so how do i apply the patch? do i just mod the notification-assistant.jsjsjs $if$ $so$ $where$ $does$ $this$ $code$ $fit$ $in$? $Thanks$
  4.    #4  
    You can either decode it by hand and edit the source file manually (It's basically inserting two small blocks of code into the original notification-assistant.jsjsjs) $or$ $you$ $can$ $grab$ $and$ $use$ $the$ $patch$ $utility$:

    Code:
    ipkg-opt install patch
  5. tozfeekum's Avatar
    Posts
    43 Posts
    Global Posts
    44 Global Posts
    #5  
    how do you use patch once you install it?
    Last edited by tozfeekum; 07/06/2009 at 08:01 PM.
  6. #6  
    This is great! Is there a way we can have it pulse twice for a new email, 3 times for a missed call, etc?
    Palm History: Palm III>IIIc>CLIÉ NR70v>CLIÉ TG50>Tungsten C>Treo 650>Treo 700p>Centro>Pre!! 6/5/09
    Phone History: Way too long

    Sorry Timmy, SERO does not work with the Pre.
    If you have an iTouch click me.
  7. #7  
    when installing the patch i get

    patching file notification-assistant.jsjsjs
    patch: **** malformed patch at line 11: + method: 'runCmd',
    ?? not sure what i did, simply copied the patch code and created a file with it..
    Last edited by lordelfkin; 07/06/2009 at 08:58 PM.
  8.    #8  
    Pulsing would be a bit of a challenge, as it would require a continuously running script changing the value of the LED intensity. Without the ability to more cleanly kick off and terminate background processes (or a robust LED API) I don't see a way to do it.
  9. #9  
    Quote Originally Posted by tozfeekum View Post
    how do you use patch once you install it?
    "patch --help" will give you the syntax and how to use
  10. as4life's Avatar
    Posts
    577 Posts
    Global Posts
    733 Global Posts
    #10  
    how do u exactly install the patch? i tried going on the pre wiki page but its down.
  11.    #11  
    Ok, the copy and paste may have marred the patch file, so here's the attachment.

    To run the patch, copy it to /usr/palm/applications/com.palm.app.messaging/app/controllers, then:

    Code:
    cd /usr/palm/applications/com.palm.app.messaging/app/controllers
    patch -p0 -i notification-assistant.jsjsjs.$patch$.$txt$
    Attached Files Attached Files
  12. atlanta's Avatar
    Posts
    324 Posts
    Global Posts
    337 Global Posts
    #12  
    Quote Originally Posted by Eguy View Post
    This is great! Is there a way we can have it pulse twice for a new email, 3 times for a missed call, etc?

    You you can just have the script sleep then go to a different state then sleep again and go back to 100
  13.    #13  
    You you can just have the script sleep then go to a different state then sleep again and go back to 100
    That's a one time pulse, but my reading of what Eguy wanted was more of a continual 'heartbeat', for lack of a better term. A morse code of sorts.
  14. #14  
    Quote Originally Posted by Keegan99 View Post
    That's a one time pulse, but my reading of what Eguy wanted was more of a continual 'heartbeat', for lack of a better term. A morse code of sorts.
    Yes, so it keeps pulsing untill you clear the notification .


    Just an FYI:


    Code:
    root@castle:/usr/palm/applications/com.palm.app.messaging/app/controllers# patch
     -p0 -i notification-assistant.jsjsjs.$patch$.$txt$
    $patching$ $file$ $notification$-$assistant$.$js$
    $Hunk$ #$1$ $succeeded$ $at$ $333$ $with$ $fuzz$ $1$ ($offset$ $144$ $lines$).
    $Hunk$ #$2$ $FAILED$ $at$ $366$.
    $1$ $out$ $of$ $2$ $hunks$ $FAILED$ -- $saving$ $rejects$ $to$ $file$ $notification$-$assistant$.$js$.$rej$
    Palm History: Palm III>IIIc>CLIÉ NR70v>CLIÉ TG50>Tungsten C>Treo 650>Treo 700p>Centro>Pre!! 6/5/09
    Phone History: Way too long

    Sorry Timmy, SERO does not work with the Pre.
    If you have an iTouch click me.
  15. atlanta's Avatar
    Posts
    324 Posts
    Global Posts
    337 Global Posts
    #15  
    Opps put it in a while statement to create a pulse effect.
  16.    #16  
    Quote Originally Posted by atlanta View Post
    Opps put it in a while statement to create a pulse effect.
    The problem there is that there's no clean way to kill the process.
  17.    #17  
    root@castle:/usr/palm/applications/com.palm.app.messaging/app/controllers# patch
    -p0 -i notification-assistant.jsjsjs.$patch$.$txt$
    patching file notification-assistant.jsjsjs
    Hunk #1 succeeded at 333 with fuzz 1 (offset 144 lines).
    Hunk #2 FAILED at 366.
    1 out of 2 hunks FAILED -- saving rejects to file notification-assistant.jsjsjs.$rej$
    Very strange. The lines being patched should be in the low 200's, not the mid to high 300's. Have you modified notification-assistant.jsjsjs $for$ $something$ $else$ $previously$?
  18. #18  
    Nope, but just noticed it was wiped clean somehow and so was my backup, just copied a fresh jsjsjs $from$ $the$ $webos$ $doctor$ $and$ $it$ $worked$.
    Palm History: Palm III>IIIc>CLIÉ NR70v>CLIÉ TG50>Tungsten C>Treo 650>Treo 700p>Centro>Pre!! 6/5/09
    Phone History: Way too long

    Sorry Timmy, SERO does not work with the Pre.
    If you have an iTouch click me.
  19. #19  
    Your first command should be mount -o remount,rw /

    not
    mount -o remount rw, /
  20. #20  
    Quote Originally Posted by Keegan99 View Post
    You can either decode it by hand and edit the source file manually (It's basically inserting two small blocks of code into the original notification-assistant.jsjsjs) $or$ $you$ $can$ $grab$ $and$ $use$ $the$ $patch$ $utility$:

    Code:
    ipkg-opt install patch
    Where is ipkg-opt located? I'm getting ipkg-opt not found?
Page 1 of 9 123456 ... LastLast

Posting Permissions