View Single Post
pelago's Avatar
Posts: 2,121 | Thanked: 1,540 times | Joined on Mar 2008 @ Oxford, UK
#6
Can I just make sure I've got the general idea of your program correct, based on my inexpert reading of the code: The program runs continuously in the background. When it detects an incoming call, it quickly changes the system-defined ringtone using a symbolic link, based on a lookup of which phone number should be in which group. The actual playing of the tone is done by the phone app itself. Is that right?

I'm just wondering what happens if for some reason the phone app gets there first and starts playing a different ringtone, before your app gets a chance to change the symlink. Will the ringtone change half-way through?

Does your app impact battery life, if it is running in the background all the time?

Thinking about a potential GUI, obviously there would need to be a way to define groups (giving each a custom name would be nice), plus a way to pick a ringtone per group. Then there would need to be a way to associate a contact with each group. I wonder if there's a way to hook into the contacts framework to do this. Maybe the group could be stored as a Note field in the contact, or something like that.