I am not using the built in ACTIVITY for Dialer. Rather trying to create my own. I wrote the following code and when I run this; the Dialer starts to dial.
package my.AndroidPhoneDialer; import android.app.Activity; import android.os.Bundle; import android.content.Intent; import android.net.Uri; public class AndroidPhoneDialer extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); Intent DialIntent = new Intent (Intent.ACTION_DIAL, Uri.parse ("tel:03332424242")); /** To Launch the Dialer Activity */ DialIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); /** To start the Activity */ startActivity(DialIntent); Intent CallIntent = new Intent (Intent.ACTION_CALL, Uri.parse ("tel:03332424242")); CallIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(CallIntent); } } On Jan 30, 11:22 pm, Charlie Collins <charlie.coll...@gmail.com> wrote: > I don't think you need any permission to initial a phone call using > the built in Activity. As long as you go through the built in activity > and included user interface, no perms required. > The CALL_PHONE permission is for making a call on your own without > using the built in Activity, as I understand it (if you want to write > your own dialer, or otherwise not go through the built in dialer). > > (And the built in Activity probably HAS the CALL_PHONE permission, so > it's not your app that needs the permission if you are handing off, > etc.) > > On Jan 30, 7:07 am, Sohail <sohail.k...@imsciences.edu.pk> wrote: > > > Hi, > > > I just created a simple application, that starts the Dial Activity and > > place a call. I did not provide any permission in the manifest file to > > start a call, but still the call activity starts. > > > I also checked the AndroidManifest.xml file, there is no permission > > added, still the activity starts. > > > can anyone explain, why this is so. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---