Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    simple script to make phone vibrate on outgoing call connection

    Reply
    Page 1 of 2 | 1   2   | Next
    droll | # 1 | 2014-02-20, 08:42 | Report

    here i offer my humble little script (with bad hacks) to make the phone vibrate when an outgoing call connects. temporary stop gap measure while jolla works on the feature.

    unfortunately, i am no expert so i don't know how to package this properly into an installer. if someone can do it, your assistance would be most appreciated.

    installation
    --------------
    1. download the zip file and extract it. in it you will find 3 files.
    2. copy "callvibra.service" into /lib/systemd/system
    3. copy "callvibra.sh" into /home/nemo
    4. copy "Vibrate" into /home/nemo
    5. change permissions on "Vibrate" by typing "chmod a+x /home/nemo/Vibrate" from the terminal.
    6. change permissions on "callvibra.sh" by typing "chmod a+x /home/nemo/callvibra.sh" from the terminal.
    7. make yourself root by typing in "devel-su" from terminal. enter your developer password.
    8. type "systemctl enable callvibra.service"
    9. reboot your phone

    now you can test if the phone vibrates when a call is made.

    feel free to make improvements to my *badly* hacked script.

    thanks.


    -----------edit
    I've updated this post with the source code to the "Vibrate" binary. it's a Qt Creator project called TestVibraUi. feel free to look through it. code borrowed from https://github.com/nemomobile/qt-mob...tics-ffmemless

    Chris actually gave some feedback on how to use vibration actuator in Qt + QML although that's not that I did in the end.

    ------------editv2
    updated callvibrate.zip so that the phone will not vibrate if the proximity sensor detects something near it e.g. when you put the phone to your ear.

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Files
    File Type: zip TestVibraUI.zip (232.4 KB, 190 views)
    File Type: zip callvibrate.zip (64.3 KB, 227 views)

    Last edited by droll; 2014-03-06 at 12:31.
    The Following 9 Users Say Thank You to droll For This Useful Post:
    ajack, edp17, J4ZZ, Jordi, Larswad, maluka, nodevel, ranbaxy, Schturman

     
    droll | # 2 | 2014-02-20, 10:57 | Report

    i seem to be having problems getting this to work properly when the phone boots up (don't understand enough of systemd yet). but running "systemctl start callvibra.service" from fingerterm as root works.

    anyone with better understanding of systemd can help?

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by droll; 2014-02-20 at 11:01.

     
    droll | # 3 | 2014-02-20, 13:33 | Report

    seems to work ok now....i just added

    After=ofono.service dbus.service dbus.sockets

    not sure if it helped or not. but the script runs properly now during boot-up. is it working for everyone else?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Larswad | # 4 | 2014-02-20, 14:16 | Report

    Be careful here people! Even if we should be (are) grateful for things like this, it is a bit scary when one of the files in the archive is a raw binary elf.

    If you submit things like that, provide the source code at least, so that users can either build themselves or review it.

    I don't like any unknown binary like that have su rights in the phone, who knows what it does except for the vibration part. I do understand it is under our own responsibility, just simply reminding people about this.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to Larswad For This Useful Post:
    minimos, shallimus

     
    droll | # 5 | 2014-02-20, 14:41 | Report

    ok. i will post the sources a bit later when i am free. i used most of the code from a github submission by a jolla sailor (chris adams).

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to droll For This Useful Post:
    Larswad

     
    droll | # 6 | 2014-02-21, 00:52 | Report

    i've updated the first post with the source code for the elf binary.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to droll For This Useful Post:
    Kaacz

     
    ajack | # 7 | 2014-02-21, 08:02 | Report

    Originally Posted by Larswad View Post
    Be careful here people! Even if we should be (are) grateful for things like this, it is a bit scary when one of the files in the archive is a raw binary elf.

    If you submit things like that, provide the source code at least, so that users can either build themselves or review it.

    I don't like any unknown binary like that have su rights in the phone, who knows what it does except for the vibration part. I do understand it is under our own responsibility, just simply reminding people about this.
    I can vouch for droll and we personally know each other and have contributed code and apps since UIQ2 days. Anyone remember a tool called SMan for UIQ?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nodevel | # 8 | 2014-03-06, 10:35 | Report

    I want to thank you for your contribution - I had missed this feature very much!

    Just one suggestion - would it be possible to recognize whether the proximity sensor is covered and vibrate only if it isn't?
    The original N900 script worked this way, so your phone wouldn't vibrate near your ear (when it's unnecessary anyways).

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by nodevel; 2014-03-06 at 10:42.

     
    droll | # 9 | 2014-03-06, 11:50 | Report

    yes, it is possible. did some tests and discovered the location of the proximity device. i'll modify the script and post it up later when i'm free.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to droll For This Useful Post:
    ranbaxy

     
    droll | # 10 | 2014-03-06, 12:31 | Report

    done! please download the new callvibrate.zip file and

    either replace only callvibra.sh file in your phone or reinstall as per the instructions above.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to droll For This Useful Post:
    nodevel, Schturman

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout