I created one sample phone app just dial a entered number like ” Intent callIntent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+9090909090);” able to call the dialed number.
I have create one service to get the phone state [Ringing or idle or offhook]. Am able to receive the proper state.
Now i need to differentiate the incoming call is dialed from device phone application or using my sample phone application. How can i achieve this ?
I tried with “intent.putExtra("CALL_KEY", "CALL_VALUE");” but am unable to receive a value :
intent.getStringExtra("CALL_KEY");
Bundle bundle = intent.getExtras();
bundle.getString("CALL_KEY");
Both returns the NULL value.
Please help me to identify in my service the phone call is made from my sample app or from default phone app ?
My Query similar to this :
Android: Can you send/receive data along a phonecall?
I find the one way to send the information to the other device , but still am finding difficulty to receive the data.
Tried with extractNetworkPortion and extractPostDialPortion , but still getting NULL at receiver end.
Help me ! How can i receive data along with a phonecall ?