1

Topic: From service it is possible to cause a standard dial-up of number?

Uri uri=Uri.parse ("tel:89031231212");
Intent call = new Intent (Intent. ACTION_DIAL, uri);
context.startActivity (call);
For the line context.startActivity (call); - error, application falls.

Calling startActivity () from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

Service does not have activity how to cause number dial-up?
After all I cause a standard dialing program (activity) as I understand.
Either this, or context - here neither that, nor another?

2

Re: From service it is possible to cause a standard dial-up of number?

I pulled the activity in sms defense from . With it there are no problems.
But to prompt to a smog only on Monday.
Therefore easier to try most.

3

Re: From service it is possible to cause a standard dial-up of number?

wadman, Thanks that frightened Monday.
The answer was in a question. Added a flag, and all earned.
call.setFlags (Intent. FLAG_ACTIVITY_NEW_TASK);
p.s.
If someone knows that he does not know - teach him.
If someone knows that he knows - listen to it.
If someone does not know that he knows - wake him.
If someone does not know that he does not know - run from it.
The Chinese wisdom.