Skip to content

sahebjamee/fieldengineer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Field Engineer - Azure Mobile Apps Demo

Try out a simple version of this demo and other Xamarin demos on "Try App Service".

In this demo, we create a Mobile App which will allow field engineers at our cable company to more easily manage their appointments throughout the day. The app will sync the engineer's jobs for that day onto their device when there is an internet connection. When there isn't an internet connection, the Mobile Apps offline sync feature keeps the records available and edittable; when the engineer connects back to the internet, the local changes are synced and any new Jobs are pulled to their device.

This is a demo where we show off some great features of Azure Mobile Apps and App Service, including:

  • Integrated Authentication with AAD and SalesForce
  • Offline Sync
  • Easy to use client SDK for Xamarin

Demo

The first step of the demo is deploying the environment and code. Checkout the Deploying section below.

Next, be sure you have an internet connection and have the Field Engineer app open. Click on refresh and that will ask you to login. If you set up Azure Active Directory and created a login within your domain, you should be able to login as that user. Until you login, none of your requests will make it through.

Once you've managed to login, you'll see all the orders you have waiting to be fulfilled. At this point, you can disconnect your internet and make some changes. All your changes will be saved through a restart of the app. If you visit the admin page that comes with your site ({sitename}.azurewebsites.net/admin), you can see that none of the records have been updated. If you connect to the internet on your device again and refresh, your changes will sync to the server. You can see those changes reflected via the admin portal.

Checkout this gif of the demo!

See also

Deploying

Full Demo

These steps will help you set up an environment to run the Field Engineer demo.

  1. Download the source from GitHub.

  2. Create a Mobile App.

  3. In the Azure Portal, navigate to your Mobile App and open the Settings blade.

  4. Click on the Authentication setting. If you have not yet created a Gateway, do so now by following the instructions in the Authentication blade.

  5. Create an AAD Application and add it to the Mobile App Authentication Azure Active Directory settings menu.

  6. Deploy the code in the ./server project. You'll need to do this from Visual Studio.

  7. Change the Gateway URL, Mobile App URL, and Mobile App name in the ./client/FieldEngineerLite/Services/JobService.cs file.

  8. Build and run the client from Xamarin. You'll need a Mac build host.

  9. You can then login using one of your AAD identities.

Try It Now Demo

This is a scaled down demo that doesn't require AAD, SalesForce, or Azure SQL DB. It's designed to work with Try App Service.

Requirements:

  • Windows w/ Visual Studio
  • OSX w/ Xamarin Studio
  • Azure Account (for a free trial, use Try App Service and the instructions there)
  1. Switch to the tryitnow branch.

  2. Deploy the code in the server folder to an Azure Mobile App. You can follow the instructions in the "Getting Started" article on Azure.com.

  3. Open up the Xamarin Project

  4. Update the Mobile App Name, Mobile App URL, and Mobile App Gateway strings in the ./Services/JobService.cs

  5. Select an iPad target and start debugging.

Issues

If you're having problems with the App, create an issue on GitHub.

We welcome and encourage PRs from the community. Just checkout Azure's CLA first.

License

See LICENSE for full details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.5%
  • Other 0.5%