Xamarin is a development platform, which allows us to code native, cross-platform iOS, Android and Windows Phone apps in C#. This tutorial focuses on Xamarin Android Intent Action to launch the phone dialer.
Requirements
- Visual Studio RC 2017
- Xamarin Studio Packages Should be installed
Please follow my steps to create launching the phone dialer and use this tutorial effectively. An intent is an abstract description of an operation to be performed.
Step 1
Launch Visual Studio RC 2017 and go to File-> New-> Project.
Step 2
Now, we need to select the Android template from the List, name the Application, press to create the Project and select where to save the project.
Step 3
We go to our new project, which has been created and then we need to navigate to Designer Page. To open the designer page, you need to open Solution Explorer ViewàSolution Explorer.
Step 4
To open Designer Page, we need to select the following-> Solution ExploreràResourcesàLayoutàMain.Xaml.
Step 5
Add the code given below in Main.Xaml Source page. This main.xaml file is our designer page and here, our Intent Action will be present. This is the Designer Page for our Application.
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <Button
- android:id="@+id/MyButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="99510256" />
- </LinearLayout>
Add the code given below in MainActivity.cs. This main acitivity is the one, which plays most important role and this makes our app to work correctly and customizing the buttons with the background activity.
- using System;
- using Android.App;
- using Android.Content;
- using Android.Runtime;
- using Android.Views;
- using Android.Widget;
- using Android.OS;
- namespace IntentAction {
- [Activity(Label = "IntentAction", MainLauncher = true, Icon = "@drawable/icon")]
- public class MainActivity: Activity {
- protected override void OnCreate(Bundle bundle) {
- base.OnCreate(bundle);
- // Set our view from the "main" layout resource
- SetContentView(Resource.Layout.Main);
- // Get our button from the layout resource,
- // and attach an event to it
- Button button = FindViewById < Button > (Resource.Id.MyButton);
- button.Click += delegate {
- var uri = Android.Net.Uri.Parse("tel:4567900");
- var intent = new Intent(Intent.ActionDial, uri);
- StartActivity(intent);
- };
- }
- }
- }
Now, run the app, using Visual Studio Android Emulator and here, we go to our app, which gets executed.
Output
Thank you for reading. Please make use of this blog. If you have any doubt, query, comment below. If you like it, follow me for more updates about Xamarin Android app development.
Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea.
ReplyDeleteNode JS Training in Chennai
Node JS Course in Chennai
Xamarin Training in Chennai
IoT Training in Chennai
Ionic Training in Chennai
Blockchain Training in Chennai
Hadoop Admin Training in Chennai
Node JS Training in Velachery
Node JS Training in Tambaram
Node JS Training in OMR
Through this post, I know that your good knowledge in playing with all the pieces was very helpful. I notify that this is the first place where I find issues I've been searching for. You have a clever yet attractive way of writing. Roblox APK Chromebook Download
ReplyDeleteThree are usually cheap Ralph Lauren available for sale each and every time you wish to buy. Tubemate APK Here Download Latest & Updated File
ReplyDeleteThree are usually cheap Ralph Lauren available for sale each and every time you wish to buy. Tubemate APK Here Download Latest & Updated File
ReplyDeleteI see some amazingly important and kept up to length of your strength searching for in your on the site TubeMate Download 2018 Version APK Free
ReplyDeletePretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Download Tubidy APK for Android Free Latest Version
ReplyDeleteEfficiently written information. It will be profitable to anybody who utilizes it, counting me. Keep up the good work. For certain I will review out more posts day in and day out. KVB Customer Care
ReplyDeleteThanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. Mini militia mod latest version
ReplyDeletethis is really nice to read..informative post is very good to read..thanks a lot! best android app
ReplyDeleteThanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family. spyfone
ReplyDeleteI’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!.. Business Coaching
ReplyDeleteThere are three android mobile phone apps that keep your phone safe. By safety, we are referring to the valuable data stored in your phone. spy phone
ReplyDeleteToday, many classroom teachers may lack personal experience with technology and present an additional challenge. Technology provides teachers with the instructional technology tools they need to operate more efficiently and to be more responsive to the individual needs of their students. Selecting appropriate technology tools give teachers an opportunity to build students' conceptual knowledge and connect their learning to problem found in the world. mobile tracker free
ReplyDeleteIn addition to being written in PHP, Magento is also designed as a flexible ecommerce platform. You can use Magento to easily customize the look, functionality, and content of the web store. Also, you can speed up ecommerce http://www.fokuszpalyazat.hu/ development by availing robust tools provided by Magento for search engine optimization, digital marketing, and catalogue management.
ReplyDeletesteam cleaners can clean lots of dirty clothes in a very short period of time that is why i always prefer to use them’ Mega888 game client download
ReplyDeleteToday, many classroom teachers may lack personal experience with technology and present an additional challenge. Technology provides teachers with the instructional technology tools they need to operate more efficiently and to be more responsive to the individual needs of their students. Selecting appropriate technology tools give teachers an opportunity to build students' conceptual knowledge and connect their learning to problem found in the world. spy cam
ReplyDeleteSome times its a pain in the ass to read what blog owners wrote but this internet site is rattling user friendly ! . dark market url
ReplyDeleteHey, you used to write magnificent, but the last several posts have been kinda boring¡K I miss your super writings. Past several posts are just a little out of track! come on! desktop compters
ReplyDeleteFind out what the top 5 eBook reading apps for Android are. These are all free apps that you can use on your Android phone or tablet to read eBooks. Veracious Tips for fitness apps
ReplyDeleteThere's no denying that condominiums are such attractive real estate purchases, a demand which spurred the construction of several projects in Tampa and elsewhere in the state and the country in the last decade or so. Even when the real estate market faces mortgage and insurance woes, some buyers, both local and foreign, are still looking into these high rise properties for possible purchases. professional spy camera glasses
ReplyDeleteAw, i thought this was a really nice post. In thought I would like to set up writing such as this additionally – taking time and actual effort to manufacture a great article… but exactly what can I say… I procrastinate alot and no indicates manage to go carried out. 188betapp
ReplyDeleteAbsolutely pent subject matter, regards for entropy. corporate banking software
ReplyDeleteWow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks website
ReplyDeleteThis is a correct blog for everyone who is wants to find out about this topic. You know so much its practically tricky to argue with you (not too I actually would want…HaHa). You actually put a fresh spin over a topic thats been discussed for several years. Great stuff, just excellent! steroids for sale
ReplyDeleteA person essentially lend a hand to make significantly articles I might state. That is the very first time I frequented your website page and up to now? I amazed with the research you made to create this particular publish incredible. Great activity! hgh for sale
ReplyDeleteMy brother suggested I might like this website. He was totally right. This post actually made my day. You can not imagine just how much time I had spent for this info! Thanks! clenbuterol for sale
ReplyDeleteMy brother suggested I might like this website. He was totally right. This post actually made my day. You can not imagine just how much time I had spent for this info! Thanks! Swim Instruction
ReplyDeleteGreat post. I am a regular visitor of your web site and appreciate you taking the time to maintain the nice site. I will be a frequent visitor for a really long time. guardians of the galaxy 2 starlord jacket
ReplyDeleteI think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. keep it up. this time to take advantage of Cleaning Services in Sacramento CA for more details.
ReplyDeleteThe year 2011 was marked with more innovations and developments in the mobile space than ever before. With healthy growth rates recorded in 2011 and optimistic predictions for the next few years, 2012 looks like the year of even more interesting mobile developments. A wide array of factors contributed to the global growth of the mobile applications (apps) adoption in 2011. singapore top mobile app developer
ReplyDeleteVeterans NGO in Quechee VT
ReplyDeleteAs I site possessor I believe the content material here is rattling excellent , appreciate it for your efforts. You should keep it up forever! Best of luck. Giày Louis Vuitton
ReplyDeleteNo doubt this is an excellent post I got a lot of knowledge after reading good luck. Theme of blog is excellent there is almost everything to read, Brilliant post. thanks for share it this time to This time to Plan a trip to japan read more about it.
ReplyDeleteI like how you think and the way you describe your views in this article. I feel strongly about it and love reading more on this topic. Thanks for sharing such great info from your blog. It’s time to avail this third party logistics services in USA for more details.
ReplyDeleteI think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. anavar 50mg uk
ReplyDeletePretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. It’s time to avail this metro cars detroit town cars for more details.
ReplyDeleteThis article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article. It’s time to avail this Kratom powder for more details.
ReplyDeletenice post thanks for share it It’s time to avail this Best Electrician Company in Long beach CA for more details.
ReplyDeleteImportant information. It is valuable content for me. I need this content. Upload more articles to provide us with updated information. Now it's time to know about your shopfront issues. signboard. For more information.
ReplyDeleteNicely explained the topic. It is worth an important topic. I must suggest uploading more articles on this topic. Now it's time to avail locksmith hatfield for more information.
ReplyDeleteGreat experience to read this amazing blog post. It is helpful for me. I enjoy it a lot reading this post. Keep sharing more articles soon. Now it's time to avail Halfcaste Cream for more information.
ReplyDeleteGood experience to read this informative blog. A lot of people listen music while doing program. For this you need good quality earbuds that make your listening experience good. To buy good quality earbuds check the link.
ReplyDeleteVery informative blog. Its very helpful for me. I really like it. I recommend you to sharing on these types of topics. To get best https://signatureshopfitters.co.uk/ for more information.
ReplyDeleteA very detail explanation provide on this topic. It is very helpful and I encourage you to publish more technical solution on these kinds of topics. To buy best african maxi dress follow the given link.
ReplyDeletetütün sarma makinesi
ReplyDeletesite kurma
sms onay
binance hesap açma
AXE8A