![]() Once we enter the phone number and click on the Call button, it will invoke built-in phone calls app and it will make a call to respective phone numbers like as shown below. When we run the above program in the android studio we will get the result as shown below. If you observe above AndroidManifest.xml file we added a CALL_PHONE permission in manifest file. Now open android manifest file ( AndroidManifest.xml) and write the code like as shown below AndroidManifest.xml As discussed, we need to add CALL_PHONE permission in our android manifest. If you observe the above code we are adding Runtime permissions to make sure our application work in both old / latest android OS versions and we used Intent action ( ACTION_CALL) to make a phone call on button click using default phone calls app. ACTION_CALL ) ĬtData(Uri.parse( "tel:" + txtPhone. ![]() Public class MainActivity extends AppCompatActivity, 101 )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |