Reputation: 3773
I am trying to make MO call from my code. For that I am using below code.
String phnum = "1234567892";
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + phnum));
startActivityForResult(callIntent,5);
Also I need to get the results like whether my call is fail , pass , dropped etc information.
For that I am trying the get the results from the below method.
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if ( requestCode == 5 ) {
Log.i(TAG,"resultCode.."+resultCode);
}
}
Above code returning only '0' every time and that too its not consistent(Some time my "onActivityResult
" is not getting called.
Please let me know if it's the right way to get the what I want or do I need to try some other mechanism.
Upvotes: 0
Views: 40