Cross-platform badge barcode scanner mobile app for iOS and Android using Xamarin.Forms for Microsoft Dynamics CRM 365 Online
At conferences and events, participant identification may be a requirement for entering various spaces. This scenario can be addressed in many different ways. Assume in this case that a decision was made to print badges that participants carry with them. The badge shows the name of the participant and has a bar code. Guides at the facility can request the badge of someone to be scanned to the identity. Also assume that no photo of the participant will be printed on the badge. The use case is simple: Scan the badge and the app shows the name and photo of the person.
Check out my blog post for more details.
Before running the app, make sure you have completed the below steps.
First make sure you have the following information available:
- Resource: Hostname of your trial Dynamics CRM 365 Online system, e.x. mycomp.crm.microsoft.com
- Application Id: Application Id provided to you by your Azure trial instance when you register this application and grant permissions.
- SearchAttribute: Determine which attribute of the Contact entity is used for the barcode lookup. Currently supported options are
contactid
,employeeid
,externaluseridentifier
, andgovernmentid
.
Now, create some sample data:
- Creating Sample Contacts - Go to your D365 site and create a couple of contacts. Provide for each one of them an image and in the attribute you selected enter a unique alpha-numeric code.
- Generate barcodes - Use one of the many online websites to generate barcodes for each of your sample contacts using the same code you entered in D365.
You can create a configuration file with the extension badgescan
that you can open in your mobile device to populate the settings of the application. It must be a comma-separated file with the following format:
Authority,Resource,ApplicationId,SearchAttribute,Keyboard,UseScanner
https://login.windows.net/common/oauth2/authorize,your.crm.dynamics.com,88a4c6e2-40a3-2048-bcb1-6391185507ef,contactid,Numeric,false
The column header are case-sensitive. The permitted values for SearchAttribute
,Keyboard
,UseScanner
are:
SearchAttribute
:contactid
,employeeid
,externaluseridentifier
, andgovernmentid
Keyboard
:Text
,Numeric
UseScanner
:true
,false
This app was created using:
- ZXing.Net.Mobile.Forms
- CsvHelper
- Xam.Plugins.Settings
- Plugin.CurrentActivity
- Com.Airbnb.Xamarin.Forms.Lottie
- Newtonsoft.Json
- Microsoft.IdentityModel.Clients.ActiveDirectory
- StackEdit
- MakeAppIcon