" Įlse if (results.StatusCode = EMDKResults.STATUS_CODE.CheckXml) TvStatus.Text = "Status: Profile applied successfully. If (results.StatusCode = EMDKResults.STATUS_CODE.Success) Change the line that finds the button, so it will find the buttonīutton.Click += delegate ).
When we crated the profile from the Android Blank template, it added a few lines for us, but we need to modify one of them. While we are initializing the User Interface lets modify setup our button call a method that will submit our profile. TvStatus = FindViewById(Resource.Id.textViewStatus) We will do that inside our OnCreate method just below where SetContentVeiw() is called. We now need to initialize our User Interface global variables so they can be referenced anywhere in the MainActivity class. When our OnCreate Activity lifecycle method is called, we call the Activity's SetContentVeiw() method, which will pull in the layout we created previously in Main.axml. Private String profileName = "ClockProfile" Private ProfileManager profileManager = null Now lets add some global variables to the MainActivity class for later use.
Start by opening up our MainActivity, select Solution pane > "Project Name" > MainActivity.csĪdd a using directive that references the Symbol EMDK for Xamarin NOTE: To veiw layout in as xml, switch from Design to Source view by selecting Source in the bottom left corner of the Form Builder
Your completed Main.axml should resemble the following:
Now lets move on and write some code to submit the profile. The ProfileManager Wizard will generate the needed xml in a file call EMDKConfig.xml and place it in the Assets folder of our project. Now click the Close on the Profile Manger.Click in the Time: field, In this field lets enter a time that follows the formatting instructions for that field.In this field letsĮnter a date that follows the formatting instructions for that field. Click in the Date: field, and notice the instructions for that field at the bottom left of the Wizard.Select the Clock feature in the selected features list, and Clock feature parameters will load in the far left pane.Once the Profile Editor loads, select the Clock feature in the Available Features pane, and then click the Right Arrow (greater than symbol) to add the clock feature to the selected features list.In the Create a New Profile Dialog, enter ClockProfile as the Name, and then click Create.Create a new Profile by clicking the Create Button.Open the ProfileManger Wizard by selecting EMDK > Profile Manager.Lets begin by creating a Profile that will set the Date and Time on our device.
In this project we will perform a simple task to demonstrate how to use the ProfileManager Wizard to create a profileĪnd then submit that profile via the ProfileManager API. Add Symbol EMDK Componentįollow this guide to add the needed component you your project. When creating a project for this tutorial use the project name GettingStartedTutorialįollow this guide to create a new project in Visual Studio.įollow this guide to create a new project in Xamarin Studio.
It covers adding the component to the project, using profile manager, using basic APIs Prerequisitesīefore starting this tutorial you must install the following software. This document contains step by step instructions for using EMDK Api's in a new Xamarin application from scratch.