• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Azure-Samples/app-service-mobile-dotnet-fieldengineer: Azure App Service sample ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Azure-Samples/app-service-mobile-dotnet-fieldengineer

开源软件地址(OpenSource Url):

https://github.com/Azure-Samples/app-service-mobile-dotnet-fieldengineer

开源编程语言(OpenSource Language):

C# 92.5%

开源软件介绍(OpenSource Introduction):

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

Azure App Service field engineer sample with web admin portal and offline-sync-enabled Xamarin.Forms client

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

This sample is for a mobile client app for field engineers at a 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 sample shows off some great features of Azure Mobile Apps and App Service, including:

  • Offline Sync
  • Easy to use client SDK for Xamarin

Overview

The first step of the sample 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.

Deploying

Just click this button to deploy!

Deploy to Azure

Manual deployment - full version (with SQL Azure)

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 (SQL CE)

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.

Mobile 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.

See also




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
kujian/simple-flexible: mobile frontend simple rem responsive code发布时间:2022-08-30
下一篇:
Emurgo/yoroi-mobile: Yoroi Wallet - iOS and Android发布时间:2022-08-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap