I am trying to get outgoing call number with intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER)
, but every time I try it returns null. I did put needed permissions and action in Androidmanifest. Can someone tell me what I am doing wrong or how to retrive number another way?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
Ok, I found out what was wrong.
First of all intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER) gives you outgoing number while phone state is idle and turns to "null" while phone status changes to OFF_HOOK.
The easiest way was to save the number before another onRecive happens.