-3

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)....??

Stewbob
  • 16,759
  • 9
  • 63
  • 107
ZeeShaN AbbAs
  • 1,365
  • 2
  • 15
  • 31

3 Answers3

6

Fortunately this is not possible. This feature would allow to: - call expensive paid services - spy on users - some other ugly activities.

Konstantin Pribluda
  • 12,329
  • 1
  • 30
  • 35
3

You cannot do such a thing (unless you rewrite a portion of the OS), and it's a damned good thing.

mah
  • 39,056
  • 9
  • 76
  • 93
1

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

Community
  • 1
  • 1
ct_rob
  • 521
  • 3
  • 16