Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Android Client and Caller ID on screen!

If you have a question or need help, this is the place to be.
Post Reply
typeiionair
Posts: 1
Joined: Mon Sep 14, 2009 4:51 pm

Android Client and Caller ID on screen!

Post by typeiionair »

Somethings are easier shown then explained...

so pretty much i want this to be able to grab the phone number off the actual event so i can display the CID information on the OSD

Image
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Android Client and Caller ID on screen!

Post by jinxdone »

One possible way to do it (Copy & paste into EG.)

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="918">
    <Macro Name="AndroidPhoneRinging" Expanded="True">
        <Event Name="Main.Android.PhoneState.RINGING.*" />
        <Action>
            EventGhost.PythonCommand(u"eg.result=eg.event.string.split('.')[-1]")
        </Action>
        <Action>
            EventGhost.ShowOSD(u'{eg.result}', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
        </Action>
    </Macro>
</EventGhost>
Trigger the event with a wildcard * (so all phone numbers will match this event, then split the event string from the '.' character and store the last one into the eg.result variable, and finally show the number with the osd. If you want to make it more complex than this it might be easier to make it as a python script instead of separate actions.

I don't know if the android client sets the eg.event.payload variable to contain the phone number when it triggers the event or not, but that would sound like an obvious thing to do. It's upto the android client though.

-jinxdone
liquid8
Posts: 35
Joined: Thu Feb 19, 2009 4:20 am

Re: Android Client and Caller ID on screen!

Post by liquid8 »

Hi typeiionair,

Future versions of the Android client will have some improvements to help with this. It currently doesn't make use of payloads.. mainly because I don't fully understand how they work, but that is a high priority for me. For now, with incoming calls, it generates two events - one generic, that the phone is ringing, and one with the specific phone number. The odd character issue is also corrected in the newer version of the client, I believe.

Feel free to give me any suggestions that would help to simplify this.. what your doing is the reason why I created the Android client.

Thanks for the tips, jinxdone!
thahim
Posts: 17
Joined: Fri Jul 11, 2014 5:33 am

Re: Android Client and Caller ID on screen!

Post by thahim »

typeiionair wrote:Somethings are easier shown then explained...

so pretty much i want this to be able to grab the phone number off the actual event so i can display the CID information on the OSD

Image
I have pasted this in eventghost, but how to connect my phone with eventghost?
EventGhost Version 0.4.1.r1669
Windows 7
Post Reply