Skip to content

bdanen/app-service-mobile-donet-fieldengineer

 
 

Repository files navigation

services platforms author
app-service\mobile
dotnet, xamarin
lindydonna

Field Engineer

Azure Mobile Apps Sample

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:

  • 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. Or, just click this button!

Deploy to Azure

Alternatively, you can deploy using the Azure Portal. Click here to deploy. Note: you can set the parameter useSQLCE to 1 or 0 to specify if you want to use SQLCE or a SQL Azure database. However, this template always creates a SQL Azure Database even if you set the SQLCE parameter to 1.

Once you've refreshed the client to get all remote changes, you'll see all the jobs 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

Just click this button to deploy!

Deploy to Azure

Manual deployment - full demo

The easiest way to deploy is to use the Continuous Integration feature of App Service.

  1. Fork this repo in GitHub.

  2. Create a new Mobile App from the portal.

  3. In the Mobile -> Data section, create a new Data Connection. For more detailed instructions, see Create a .NET backend using the Azure portal.

  4. In the portal, navigate to All Settings for the new app.

  5. In the Publishing section, select Continuous deployment.

  6. Configure source control to point to your fork of this repo.

  7. Click the Sync button to do an initial deployment.

Try App Service version

There is a project configuration that uses SQL CE as the server database and therefore does not require SQL Azure.

To set up this version, after step #2 above, add an app setting with key TRY_APP_SERVICE and value 1. To set an app setting, go to All Settings -> Application Settings -> App Settings. Then, continue with steps 3-6 above.

Client project

Requirements:

  • Xamarin Studio running on Mac OS X
  • Azure Account (for a free trial, use Try App Service and the instructions there)

Steps:

  1. Open up the Xamarin Project

  2. Update the Mobile App Name, in ./Services/JobService.cs

  3. 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# 92.6%
  • Batchfile 4.9%
  • PowerShell 2.0%
  • Other 0.5%