Scenario: I want to detect that the incoming call is actually a forwarded call and not a direct call to me. Android briefly displays a toast notification "forwarded call" which disappears by the time I remove my phone from my pocket or when i am driving. Hence i want to probably change my ringtone when the receive forwarded call.
I think we can approach this via 2 ways. In first approach we can try to check if the call is forwarded. I went to andriod forum that yes this can be achieved via class LISTEN_CALL_FORWARDING_INDICATOR which is used to raise the toast notification internally. The permission used by android to access this class is "Read_Phone_State". However tasker can read only if phone is off hook or ringing etc. and not forwarded.
Does any one if we can configure a profile via this approach?
Second approach is when the toast notification is displayed try to trigger a tasker profile. But I dont know what conditions to check to trigger a profile based on toast notification. Any experts on this approach?