the code you posted is the thing I was successfully able to do in 3 different languages.

I want a background service that sends a broadcast *when I receive a phone call*. As far as I know I can only do that in java or xamerin.