Reputation: 119
i want to start an intent in a service,the intent is used to called somebody. follow is my code:
Intent call=new Intent("android.intent.action.CLL",Uri.parse("******");
call.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(call);
Log.d("test","success");
and the AndroidManifest.xml
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".detimecall"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".gettime" />
</application>
<uses-permission android:name="android.permission.CALL_PHONE"/>
how can i solution this problem?
Upvotes: 0
Views: 401