Mobile Development Name Title Company.

Slides:



Advertisements
Similar presentations
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
Advertisements

Power BI Sites and Mobile BI. What You Will Learn Sharing and Collaboration Introducing Power BI Exploring Power BI Features and Services Partner Opportunities.
Interactivity Navigating a data model Working with large quantities of data Entry Editing and adding data User feedback and validation Presentation.
Vision: Modernizing the Office Platform SharePoint SharePoint 2007 Sandbox SharePoint 2010 SharePoint Azure, IIS, LAMP, etc… _api SharePoint.
What are Access Web App What are “Apps for Office” Microsoft Access Access “Apps for Office” Value of “Apps for Office” Apps for Office How it all works.
travel Suru Windows 7 Release NET 4.0 / Surface 2.0 Release Multi-Touch Controls Multi-Touch API Surface Multi-Touch Controls & API Surface.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
Rich Platform Services Manageability User Experience.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
demo Demo.
Cloud Roadshow. Advanced SharePoint add-in Development.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
1/10/2018 9:33 PM Cloud Roadshow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO.
1/27/2018 5:13 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Demand Management and Workflow
Integrating SharePoint 2010 with Office 2010
Microsoft Virtual Academy
Remote Event Receivers
6/10/ :23 PM TOOL-504T A deep dive into Visual Studio 11 Express for designing Metro style apps using XAML Joanna Mason & Unni Ravindranathan Program.
TFS Database Import Service for Visual Studio Team Services
Business Connectivity Services in SharePoint 2010 and Office 2010
SPC Developer 6/25/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Virtual Academy
Build /4/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Accessing and Surfacing LOB Data in SharePoint 2010
Build data-driven collection and list apps using XAML
Power your app with Live services
Excel Services Deployment and Administration
Office Power Hour New developer APIs and features for Apps for Office
Building great Metro style apps for mobile broadband devices
SharePoint Online Management and Control
Power Apps & Flow for Microsoft Dynamics SL
Introduction to mobile app development Module 3 – Improving your App Studio app Lance McCarthy.
Setting up team development infrastructure for SharePoint 2013
Office 365 Development July 2014.
Developer Patterns to Integrate Silverlight 4.0 with SharePoint 2010
Office 365 Development.
Tooling and Diagnostics
SPC2012 – IT-Pro 11/30/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows Azure Keenan Newton 3-021
Building event-driven, long-running apps with Windows workflow
12/27/2018 4:59 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or.
TechEd /28/ :27 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Authoring for Microsoft Silverlight 4 with Microsoft Expression Blend
Tech Ed North America /1/ :36 AM Required Slide
Agenda OAuth Concepts Programming OAuth.
SPC Developer 1/1/2019 Deep Dive on the Capabilities of SharePoint Online's New Public Website Josh Stickler Program Manager WCM Kevin Gjerstad Principal.
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
1/16/2019 8:14 PM SAC-863T Delivering notifications with the Windows Push Notification Service and Windows Azure Darren Louie, Nick Harris Program Manager,
TechEd /18/2019 2:30 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Tech·Ed North America /18/2019 4:15 PM
Office 365 Development.
Visual Studio 2010 SharePoint Development Tools Overview
Office 365 Development.
From Development to Production: Optimizing for Continuous Delivery
2/27/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Microsoft Office 4/3/2019 Deep Dive into native Universal App development with the Office 365 APIs Speaker name Title Microsoft Corporation © 2012 Microsoft.
Silverlight Debugging
Using tiles and notifications
4/19/2019 1:57 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
4/20/2019 Share © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or.
Enterprise Developer Camp Jumpstart
The complete developer's guide to the SkyDrive API
Office 365 Development July 2014.
Erik Porter Program Manager ASP.NET Microsoft Corporation
Building Windows Store Apps with Windows Azure Mobile Services
8/23/ :09 PM #DEV332 Building Modern, HTML5-Based Business Apps on Windows Azure and Office 365 with Visual Studio LightSwitch Andrew
Day 1, Session 4 Building Your Service Catalog
Presentation transcript:

Mobile Development Name Title Company

Agenda Overview Phone Development Push Notifications Location-Based Apps

Overview

Mobile Apps and SharePoint List Apps OOB Lists Custom Lists External Lists General Apps Silverlight CSOM Phone apps can be based on SharePoint lists or simply use the Silverlight CSOM

Types of Mobile Apps Simple SharePoint List Apps Use a SharePoint list as the data source Push Notification Apps Receive List Item events Receive Workflow state-change events Location-Aware Apps Utilizes the new Location field type Simple SharePoint List App This just uses a list as a data source and displays it on the phone Push Notification App SharePoint 2013 enables Windows Phone 7 applications to receive notifications about certain events in SharePoint Server, such as the addition of a new item to a SharePoint list or a change in stage in a workflow. Push notifications are relayed to Windows Phone 7 devices by the Microsoft Push Notification Service (MPNS), and these notifications can be received by the phone user even if the application is not running. This enables you to build Windows Phone applications that can receive notifications when some content or something of the user’s interest changes in SharePoint. For example, you can build a case management application where a call center executive creates a new customer service request in SharePoint and assigns it to a technician. The technician sees a notification of a new case assignment on the Case Management application on his or her phone and takes the necessary action. Location-Aware App Using the new Location field type in SharePoint 2013 Technical Preview lists, you can easily create location-aware applications. An example could be a "My Travel Organizer"-type of application that lets users view their travel plans that are stored in SharePoint by using their mobile phone, and also see who from their company is traveling to the same location on the same date. Another example could be expanding the previous case management scenario: The technician can find the location of his next customer on the Bing map and then use that information to get the driving directions from the current location on the phone

Overview - Roles SharePoint Users Phone Users Phone developers WP Phone developers Visual Studio These are the roles involved, which are discussed in the next few slides SharePoint & Visual Studio SharePoint Developers

Roles SharePoint Developer Phone Developer Browser, SPD, or VS Creates List Optionally Utilize Location Field Phone Developer VS, Blend List Wizard, Templates CSOM SharePoint & Visual Studio SharePoint Developers Phone developers Visual Studio SharePoint Developer The SP developer does what he always does. He creates lists (standard or external) that can be used as data sources for phone apps. He can include the Location field type in a list to support location-aware apps. Phone Developer Uses Visual Studio and the Phone project templates. The templates include a wizard that allows you wo easily create a phone app based on an existing list.

Security Supported Authentication Cross-Firewall Connectivity Forms-Based Office 365 Basic Cross-Firewall Connectivity User Access Gateway Alternate Access Mapping To work against a SharePoint instance with the Windows Phone Developer Tools, you must have a server with either basic or forms-based authentication enabled when you are using an on-premises instance. By default, SharePoint Online has browser-based authentication enabled. During the connection and URL validation steps, the server prompts you for your credentials, which are cached.

Phone Development

Phone Development Environment Supported Environment Windows 7 Visual Studio 2010 Installation Process Windows Phone 7.1 SDK Visual Studio 2010 templates (SPDXMobile.msi) Requires on-prem SharePoint 2013 environment Phone development is not now and will not be supported on server operating systems. Only Visual Studio 2010 is supported In order to create phone apps, you need an on-premise SharePoint 2013 environment. You also need a Windows 7 environment with Visual Studio 2010 Windows Phone 7.1 SDK Mobile App Templates (SDPXMobile.msi)

SharePoint Developer Role Browser Development Custom Lists SharePoint Designer Development External Lists Visual Studio Development Apps Custom List Definitions External Content Types Again the point here is that the SharePoint developer just makes lists in the normal way

Phone Developer Experience New Project Dialog Windows Phone Empty SharePoint Application Windows Phone SharePoint List Application The New project dialog contains two new projects for Phone Windows Phone Empty SharePoint Application When you create a new Visual Studio project using this template, you get an empty project with references to the necessary Windows Phone assemblies and the two SharePoint Phone-related client assemblies. The template allows for many possibilities, and it is up to the developer to write the necessary code for the desired SharePoint phone application Windows Phone SharePoint List Application This template lets you create one of the most common mobile applications you can create in SharePoint 2013 Technical Preview—that is, surface data from a SharePoint list in a Windows Phone application. When you create a new application using this template, you are prompted to enter a SharePoint on-premises or SharePoint Online URL and select a SharePoint list (both regular lists and external lists are supported). Visual Studio then auto-generates all the necessary files for the list mobile application. Without writing a single line of code, you can run the application (F5) and see the list data on the Windows Phone Emulator.

Phone Developer Experience Windows Phone SharePoint List Application Launches a Wizard

Phone Developer Experience Windows Phone SharePoint List Application Launches a Wizard Select List

Phone Developer Experience Windows Phone SharePoint List Application Launches a Wizard Select List Select View

Phone Developer Experience Windows Phone SharePoint List Application Launches a Wizard Select List Select View Select Operations

Phone Developer Experience Windows Phone SharePoint List Application Launches a Wizard Select List Select View Select Operations Select Fields

Phone Developer Experience Windows Phone SharePoint List Application Launches a Wizard Select List Select View Select Operations Select Fields Order the Fields

Phone Developer Experience Windows Phone SharePoint List Application Launches a Wizard Select List Select View Select Operations Select Fields Order the Fields Project is Created

Model-View-ViewModel Pattern Client Server View ViewModel Model The Silverlight applications created for the phone use the MVVM pattern. The Model-View-ViewModel (MVVM) pattern provides a flexible way to build Silverlight applications that promotes code re-use, simplifies maintenance and supports testing. The pattern consists of three different components including the Model (entities and code on the server), the View (the Silverlight screens) and the ViewModel (the glue between the Model and the View). The goal of the MVVM pattern is to separate the display of the data from the logic which is in turn separated from the data. The Views are the Silverlight screens created in XAML. Note that XAML doesn’t support any business logic. It simply displays the data. The Model is the SharePoint list The ViewModel contains all of the state management and logic for the application. The advantage of this separation is that it supports automated unit testing and ease of maintenance. Silverlight is uniquely-suited for MVVM pattern because it supports binding the XAML elements to objects delivered from the ViewModel layer.

Project Files Key File Description App.xaml Handles application lifetime DisplayForm.xaml Defines the UI for displaying a list item on the phone EditForm.xaml Defines the UI for editing a list item on the phone NewForm.xaml Defines the UI for creating a new list item on the phone List.xaml Defines the UI for the All Items view on the phone ListViewModel Data source for the All Items view DisplayFormViewModel Data source for the display item view EditFormViewModel Data source for the edit item view NewFormViewModel Data source for the new item view DataCache Supports data caching and off-line access This table lists the various project files that are associated with phone development. The MVVM model makes it easy to modify the project after it is generated.

Silverlight Client Object Model on the Phone ClientContext context = new ClientContext(ListUrl); Authenticator at = new Authenticator(); at.UserName = "pkmacct"; at.Password = "test!"; at.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication; at.CredentialCachingEnabled = true; at.CookieCachingEnabled = true; context.Credentials = at; ListItemCollection items = context.Web.Lists.GetByTitle(ListName).GetItems(CamlQuery.CreateAllItemsQuery()); context.Load(items); context.ExecuteQueryAsync(succeed, failure);

OData Model on the Phone ODataAuthenticator oat = new ODataAuthenticator(); oat.UserName = "pkmacct"; oat.Password = "test!"; oat.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication; oat.CredentialCachingEnabled = true; oat.CookieCachingEnabled = true; oat.AuthenticationCompleted += new EventHandler<SendingRequestEventArgs>(OnAuthenticationCompleted); // The Authenticate method will raise the AuthenticationCompleted event. oat.Authenticate("My_service_URL");

Phone Development demo

Push Notifications

Push Notifications - Architecture SharePoint 3. Phone registers with registration API, which writes information to subscription list in App. Server App The subscription list in the app is provisioned as part of feature Subscription Store (list in the app) Registration API 1. Get URI Notification API app 4. When an app event is fired, the app looks up the subscription list in app & then calls the notification API for all phones that need to be notified Push notifications allow for real-time notification of events. SharePoint apps are created that utilize the Microsoft Push Notification Service (MPNS), which is a cloud-based service This service send notifications to phone apps that are registered to receive them in the Host SPWeb When the phone app is installed, the end user is prompted to provide the URL of a Hosting SPWeb The phone app uses this information to contact the Host and get a channel URI from MPNS The phone app registers itself with the Subscriber Store of the Host SPWeb PNS 2. Return URI 5. PNS notifies the phones

Notification Types Toast Notifications Tile Notifications Displayed at the top of the screen for 10 seconds Tapping the notification launches the App Tile Notifications Updates the a Tile on the Start area Raw Notifications Received when the target app is running

SharePoint Server Configuration Push Notification Feature Allows a phone to register with the SPWeb Custom Code Developer must write code to send notifications SPWeb.PushNotificationSubscribers contains registrations Activating the "Push Notifications" feature allows phones to register with the SPWeb. A developer can take advantage of, for example, sending notifications to subscribed phones through MPNS based on identified events on the server (such as an item being added to a list), but doing so requires wiring up the relevant event and writing code on the server and writing "receiving" and subscription code for the phone.

Push Notifications - Registering for Notifications clientContext.Web.RegisterPushNotificationSubscriber( SPPhoneNotificationSubscriberType.WP7, d231398c-f26b-4e5c-af57-ec7c5f694eb6, httpChannel.ChannelUri.AbsoluteUri); clientContext.ExecuteQueryAsync(onRegisterQuerySucceeded, onRegisterQueryFailed); Windows Phone Apps use the Silverlight Client Object Model to talk to SharePoint 2013 The RegisterPhoneNotificationSubscriber method registers the phone to receive events. SPPhoneNotificationSubscriberType.WP7 identifies the device as a Window Phone 7 d231398c-f26b-4e5c-af57-ec7c5f694eb6 is the ID of the specific instance of the Phone App httpChannel.ChannelUri.AbsoluteUri is the channel URI that will receive notifications

Push Notifications - Sending a Toast Notifications <?xml version="1.0" encoding="utf-8"?> <wp:Notification xmlns:wp="WPNotification"> <wp:Toast> <wp:Text1>Title</wp:Text1> <wp:Text2>Message</wp:Text2> <wp:Param>Parameter</wp:Param> </wp:Toast> </wp:Notification> The notification is sent to the registered URI channel using an HttpWebRequest The above XML shows a sample of a Toast notification

Push Notifications demo

Location-Based Apps

Location Fields: SharePoint Lists New Type of Field Contains Lat/Long Location Picker Map Type Ideal for Mobile Apps

Location Fields Adding a Location Field public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPWeb site = properties.Feature.Parent as SPWeb; SPList list = site.Lists.TryGetList("Service Calls"); if (list != null) list.Fields.AddFieldAsXml( "<Field Type='Geolocation' DisplayName='Location'/>", true, SPAddFieldOptions.Default); list.Update(); } Currently, location fields have to be added to a list using code.

Adding a Bing Maps key PowerShell Set-SPBingMapsKey –BingKey <key> Client-Side OM ClientContext ctx = new ClientContext("http://contososerver"); Web web = ctx.Web; web.AllProperties["BING_MAPS_KEY"] = <key>; web.Update(); ctx.ExecuteQuery(); Server-Side OM using (SPSite siteCollection = new SPSite("http://contososerver")) { SPWeb site = siteCollection.RootWeb; site.AllProperties["BING_MAPS_KEY"] = <key>; site.Update(); } Currently, location fields have to be added to a list using code.

Location-Based Apps demo

Summary Overview Phone Development Push Notifications Location-Based Apps

Q&A

© 2012 Microsoft Corporation. All rights reserved © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.