hey I want to make a call from my application, so far I found that
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(callIntent);
but there is a problem that I want to call person secretly and this call the default Activity can I write my own activity for making call or receiving call secretly (means without any UI call run on background)....??
Fortunately this is not possible. This feature would allow to: - call expensive paid services - spy on users - some other ugly activities.
You cannot do such a thing (unless you rewrite a portion of the OS), and it's a damned good thing.
This is not possible with the public APIs. There was a way to use the Android internal APIs, but since 2.3 this is not possible anymore due to new security restrictions. See also How to grant MODIFY_PHONE_STATE permission for apps ran on Gingerbread