Sascha Corti
Just a year after Windows Phone 7 was released to the market, Microsoft is updating the already widely popular platform to a new release called “Mango”, which adds a lot of highly anticipated features, especially for developers.
This session will introduce you to what’s new in the Mango platform for you as a developer. Many samples will show you the latest additions including background agents, the new on-device database, how to make your application run in the background and how to create augmented-reality applications or create multiple live tiles per application, that can be easily updated from within the running app.
http://soft-shake.ch/2011/conference/sessions/microsoft/2011/09/06/windows-phone-7-mango.html
What Are The Drone Anti-jamming Systems Technology?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
1. cocktail d’expérience informatiques
Genève 3 & 4 octobre 2011
Seconde édition
soft-shake.ch
Auteur Sascha P. CORTI
Track Microsoft
Session Windows Phone 7
Mango Overview for
Developers
2.
3. Windows Phone 7 Mango
Overview for Developers
Sascha P Corti
.
Developer Evangelist, Microsoft Switzerland
sascha.corti@microsoft.com | blog | twitter
5. Windows Phone “Mango”
Extras, Tiles Calendar
Cloud and Contacts
Integration Push, Alerts Maps
Services
Fast App Switch Silverlight and
App UI XNA
Model Model Multitasking Integration
Software Gen GC SQL CE
Architecture
Silverlight 4.0 Sockets
Hardware
Camera, Sensors & Motion
Foundation
Gyro Flexible chassis
6. Cloud and
Integration
Services
App UI
Model Model
Software
Architecture
Hardware
Foundation
Multi-Tasking
7. Multitasking
Start in Foreground
Continue in
current fav Background
0:12
0:11
0:10
0:09
9:00 AM
Friday
Words 21
October
ByPaul van Dyk
TechDays 2011 Fall
Bern
9:00 AM – 6:00 PM
8. Background Notification Service
Alarms
using Microsoft.Phone.Scheduler;
private void AddAlarm(object sender, RoutedEventArgs e)
{
Alarm alarm = new Alarm("Long Day");
alarm.BeginTime = DateTime.Now.AddSeconds(15);
alarm.Content = "It's been a long day. Go to bed.";
alarm.Title = "Alarm";
ScheduledActionService.Add(alarm);
}
Modal
Snooze and Dismiss
Sound Customization
No App Invocation
No Stacking
9. Background Notification Service
Reminders
using Microsoft.Phone.Scheduler;
private void AddReminder(object sender, RoutedEventArgs e)
{
Reminder reminder = new Reminder("CompanyMeeting");
reminder.BeginTime = DateTime.Now.AddSeconds(15);
reminder.Content = "Soccer Fields by The Commons";
reminder.Title = "Microsoft Annual Company Product Fair 2009";
reminder.RecurrenceType = RecurrenceInterval.Yearly;
reminder.NavigationUri = new Uri("/Reminder.xaml", UriKind.Relative);
ScheduledActionService.Add(reminder);
}
Persisted Across Reboots
Rich Information
Integrates with other Reminders
Snooze and Dismiss
Launch App
Follows Phone Global Settings
10. Background Transfer Service
using Microsoft.Phone.BackgroundTransfer;
void DownloadWithBTS(Uri sourceUri, UriBackgroundTransferEventArgs
GetCurrentProgress()
BtsProgressChanged(object sender, destinationPath)
e)
{
My WP Book App { btr = new BackgroundTransferRequest(sourceUri, destinationUri);
DrawProgressBar(btr.BytesReceived);
download
} btr.TransferStatusChanged += BtsStatusChanged;
DrawProgressBar(e.Request.BytesReceived);
btr.TransferProgressChanged += BtsProgressChanged;
BackgroundTransferService.Add(btr);
}
Ready Player One
completed
Jpod
POST Great Mysteries o
<~3.0 MB
WP7 for Devs My WP Background
Book App Transfer <20 MB
GET Cloud
Service
< 100 MB
ISO Store
12. Generic Background Agents
Occurrence: Every 30 min
Duration: 15 seconds
Agents Scenarios: Incremental Data Sync
Periodic Occurrence: External power, non-cell network
On Idle Duration: 10 minutes
Scenarios: Data Feasting
May have One or Both
Initialized in Foreground, Run in Background
Persisted across Reboots
User control through Control Panel
Up to a Maximum of 18 periodic agents
Synchronize with Foreground through Mutex
Agent runs for up to 14 Days (can be renewed)
19. Multitasking Cheat Sheet
Job Tool
Resume quickly from the lock screen Fast App Switching
Set an alarm or reminder at a precise time Background Notification
Upload or download files Background Transfer
Event-based toast/tile updates Push Notifications
Location-based services; regular toast/tile Periodic Background Agent
updates; data pre-caching; etc.
Play music in the background Background Audio Player
Synchronize data; SETI@home; etc. Resource-Intensive Agent
Real-time GPS tracking Run under the lock screen
20. Cloud and
Integration
Services
App UI
Model Model
Software
Architecture
Hardware
Foundation
New Sensor Capabilites
22. Hardware Sensors & API
HARDWARE APIs
Accelerometer MotionSensor
All the Sensor + Math
Use whenever available
Compass Also works w/o Gyro
Not Mandatory in HW
(but present if Gyro is)
Gyro Individual
Not Mandatory in HW APIs available
for all Sensors
24. Cloud and
Integration
Services
App UI
Model Model
Software
Architecture
Hardware
Foundation
Local Database
25. Local Data Storage: Overview
Apps store private data in Isolated Storage
Settings and properties in the app dictionary
Unstructured data in Isolated Storage files App Root Folder
Structured data in database files
Install
Creates root folder
Package sandboxed to App
Manager DB Database
File (r/o)
App Data Folder
Creates/Manages
App files and settings
WP7 Isolated
Storage APIs Application DB Application
Settings File Files
Database file
30. Cloud and
Integration
Services
App UI
Model Model
Software
Architecture
Hardware
Foundation
Live Tile Improvements
31. Live Tile Improvements
Local Tile APIs
Full Control of ALL Properties
Multiple Tiles per app
Create, Update / Delete / Query
Launches directly to In App URI
32. Live Tiles – Local Tile API
Back of Tile Updates
Full Control of all Properties when your App is in Foreground
or Background
Content, Title, Background
Content Content
string is Background
bigger
Title Title
Flips from Front to Back at random Interval
Smart Logic make Flips Asynchronous
34. What’s New on the Marketplace?
http://windowsphone.com/s?appid=
8bda38b9-619e-4368-b849-d25630266c4b
ITIN
Resubmit Apps to Reach
New Markets!
35. Marketplace: Distribution Options
“Beta” Private Public
# of users 100 unlimited unlimited
App Price Must be “free” Can be “paid” Can be “paid”
Time Limited Expires after 90d No No
Updateable No Yes Yes
Certification No Yes Yes
Required
Discoverable No No * Yes
Access Control Limited to test user No No
WLIDs provided
Target Users Beta Users Private Users Public Users
* People who obtain deeplink can access
36. Marketplace: New Regions
1.8 Billion More Potential Users
Resubmit your App to reach New Markets!
Hong Kong
Singapore
Today (16)
+19 New (35)
38. Online Resources I : The Basics
App Hub http://create.msdn.com
Tools http://wpdev.ms/wpsdk71rc
WP on MSDN Library http://wpdev.ms/wponmsdn
WP “How To” Index http://wpdev.ms/wphowtos
WP UX Guide http://wpdev.ms/wpuxguide
WP P&P Guide http://wpdev.ms/wppnpguide
WP Dev Blog http://wpdev.ms/developerblog
Porting to WP http://wpdev.ms/porting
WP Labs (RTM) http://wpdev.ms/wprtmhols
WP Labs (Mango) http://wpdev.ms/mangohol
WP SL Quick Starts http://wpdev.ms/xamlquick
39. Online Resources II : Videos
WP Jumpstart http://wpdev.ms/jumpstarts
WP How To Videos http://wpdev.ms/howvids
WP “Absolute Beginners” http://wpdev.ms/beginvids
Inside WP on C9 http://wpdev.ms/insidewp
Design Toolbox http://wpdev.ms/designtb
WP Game Dev Vids http://wpdev.ms/gamevids
WP at MIX 11 Vids http://wpdev.ms/wpmix11
WP at TENA 11 Vids http://wpdev.ms/wptena11
40. Online Resources III : Other
App Hub FAQ http://wpdev.ms/apphubfaq
App Hub Forums http://wpdev.ms/ahforum
Registration Walkthrough http://wpdev.ms/regwalk
Submission Walkthrough http://wpdev.ms/subwalk
Cert Requirements http://wpdev.ms/certreq
WP Samples on MSDN http://wpdev.ms/officialsamples
SL Toolkit for WP http://wpdev.ms/wpsltk
Azure Toolkit for WP http://wpdev.ms/wpwaztk
41. Online Resources IV : 3rd Party
Silverlight Show on WP http://www.silverlightshow.net/Search.a
spx?q=%5Bwindows-phone-7%5D
Windows Phone Geek http://www.windowsphonegeek.com/
WPDEV on Twitter http://twitter.com/#search?q=wp7dev
WPDEV on REDDIT http://www.reddit.com/r/wp7dev
WPDEV on Stack http://stackoverflow.com/questions/tag
Overflow ged/windows-phone-7
43. Contacts: Hello, World!
Contacts contacts = new Contacts();
contacts.SearchCompleted += new
EventHandler<ContactsSearchEventArgs>((sender, e) =>
{
... = e.Results;
});
state
// E.g. search for all contacts
contacts.SearchAsync(string.Empty, FilterKind.None, null);
filter expression Filter kind: name, email , phone
(not a regex) or pinned to start)
// E.g. search for all contacts with display name matching "Sa"
contacts.SearchAsync("Sa", FilterKind.DisplayName, null);
44. Appointments: Hello, World!
Appointments appointments = new Appointments();
appointments.SearchCompleted += new
EventHandler<AppointmentsSearchEventArgs>((sender, e) =>
{
... = e.Results;
}); start date and time
// E.g. get next appointment (up to 1 week away)
appointments.SearchAsync(DateTime.Now,
DateTime.Now + TimeSpan.FromDays(7),
1, null);
end date and time
Maximum items to return state
45. Performance and Best Practices
Be responsible
Your privacy policy should cover how you use the
user’s contact information
Keep out of the way
Users have widely varying contact list sizes
Your UI should handle delays gracefully
Don’t let data get stale
Data returned is a snapshot
Refresh state when reasonable
46. New Choosers and Launchers
New
SaveRingtoneT ask
AddressChooseT ask
BingMapsT ask
BingMapsDirectionsT ask
GameInviteTask
Updates:
EmailAddressChooserT ask
PhoneNumberChooserT ask
49. Contacts/Appointments Data Shared
Contact Name Other Contact Appointments
and Picture Data / Events
Windows Live Social YES YES YES
Windows Live Rolodex
YES YES n/a
(user created and SIM import)
Exchange accounts
YES YES YES
(corporate plus Google, etc.)
Operator Address Books YES YES n/a
Facebook YES NO NO
Other networks in the People
NO NO NO
Hub (e.g., Twitter)
51. MarketPlace: Improvements
Challenges Fixed Challenges Remaining
Support Responsiveness. 98% of App certification consistency and test
support inquiries are now responded results feedback.
to within 24 hours ID validation process is cumbersome.
Free app submission limits. Revamping individual validation
Increased limit from 5 to 100 per year process
Market-specific registration W-8 form requirement (for non-US
challenges. Fixed registration form developers). Working to simplify and
and postal code validation logic automate
Registration problems due to Xbox Submission process has errors.
profile. Fixed the linking of developer Working to eliminate bottlenecks
profile information between App hub and streamline process
and xbox.com Registration payment failures for
Blank or incomplete test results. some. Fixing remaining payment
Now providing complete certification exception scenarios.
failure report
52. New Beta Distribution Service
Distribute pre-certified Apps to a Set of Beta Users
Capabilities
Developer selects List of Testers
(up to 100)
Developer sends Email with
Private Deeplink to the T esters
Only T esters selected in App Hub
can test the Application and
provide Feedback for 90 days
Beta cannot be updated
Benefits
No need to unlock Phones to test Apps