08448380779 Call Girls In Civil Lines Women Seeking Men
A lap around mango
1. A lap around
Windows Phone
codename “Mango”
Atley Hunter, MCSD, MCDBA, MCPD
MVP Windows Phone Development
2. Agenda: Windows Phone codename “Mango”
Extras Calendar
Cloud and Contacts
Integration Push, Alerts Maps
Services
FAS Silverlight
App UI and XNA
Model Model Multitasking integration
Software Gen GC SQL CE
Architecture
Silverlight 4.0
Hardware Camera, Sensors & Motion
Foundation
SoC Flexible chassis
Windows Phone Microsoft Corporation.
3. Cloud and
Integration
Services
Hardware App
Model
UI
Model
Foundation Software
Foundation
Hardware
Foundation
4. Hardware Foundation Updates
Capacitive touch
4 or more contact points
Sensors Motion Sensor
A-GPS, Accelerometer, Compass, Light, Proximity, Gyro
Compass
Camera
Improved
5 mega pixels or more
capability
Multimedia detection APIs
Common detailed specs, Codec acceleration
Memory
256MB RAM or more, 8GB Flash or more
GPU
DirectX 9 acceleration
CPU
Qualcomm MSM8x55 800Mhz or higher MSM7x30
Hardware buttons | Back, Start, Search
Windows Phone Microsoft Corporation.
5. Accelerometer
+Y
Measures resultant acceleration
(force) on device
Pros:
Available on all devices -Z
Cons: -X
+X
Difficult to tell apart small
orientation changes from small
device motions
5 Windows Phone Microsoft Corporation.
7. Camera
Access to live camera stream
PhotoCamera
Silverlight 4 Webcam
Display in your app
Video Brush
7 Windows Phone Microsoft Corporation.
8. When to use each approach
PhotoCamera Webcam
Take High Quality Photos Record Video
Handle Hardware Button Record Audio
Handle Flash mode and Focus Share code with desktop
Access Samples (Pull Model) Access Samples (Push Model)
8 Windows Phone Microsoft Corporation.
10. Gyroscope
Measures rotational velocity on 3
axis
Optional on Mango phones
Not present in pre-Mango
WP7 phones
10 Windows Phone Microsoft Corporation.
12. Compass (aka Magnetometer)
Gives 3D heading of Earth’s magnetic and Geographic
North
Subject to external electromagnetic influences
Requires user calibration over time
Great inaccuracies in orientation, up to 20 degrees
Significant lag
Availability:
Optional on “Mango” phones
Included in some pre-Mango WP7 phones
13 Windows Phone Microsoft Corporation.
13. Compass API
protected override void OnNavigatedTo(NavigationEventArgs e){
if (Compass.IsSupported) {
compass = new Compass();
compass.CurrentValueChanged += compass_CurrentValueChanged;
compass.Start()
}
}
private void compass_CurrentValueChanged(object sender,
SensorReadingEventArgs<CompassReading> e) {
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
CompassRotation.Angle = -e.SensorReading.TrueHeading;
Heading.Text = e.SensorReading.TrueHeading.ToString("0 ");
});
}
14 Windows Phone Microsoft Corporation.
15. Motion Sensor
Virtual sensor, combines gyro + compass + accelerometer
Motion Sensor vs. gyro or compass or accelerometer
More accurate
Faster response times
Comparatively low drift
Can disambiguate motion types
Has fall-back if gyro is not available
Always prefer Motion Sensor when available
16 Windows Phone Microsoft Corporation.
16. Motion API
if (Motion.IsSupported) {
_sensor = new Motion();
_sensor.CurrentValueChanged += new
EventHandler<SensorReadingEventArgs<MotionReading>>
(sensor_CurrentValueChanged);
_sensor.Start();
}
void _sensor_CurrentValueChanged(object sender, SensorReadingEventArgs<MotionReading> e)
{
Simple3DVector rawAcceleration = new Simple3DVector(
e.SensorReading.Gravity.Acceleration.X,
e.SensorReading.Gravity.Acceleration.Y,
e.SensorReading.Gravity.Acceleration.Z); …
}
17 Windows Phone Microsoft Corporation.
17. Motion Sensor Adapts to Devices
Accelerometer Compass Gyro Motion
Yes Yes Yes Full
Yes Yes No Degraded
Yes No Yes Unsupported
Yes No No Unsupported
Degraded modes have lower quality approximations
When Motion.IsSupported is false, apps should use
accelerometer or other input and control mechanisms
18 Windows Phone Microsoft Corporation.
18. Sensor Calibration
Calibration Event is fired when calibration is needed
Both Compass and Motion sensors need user
calibration
Apps should handle it
Provide UI asking user to move device through a full
range of orientations
Not handling will cause inaccurate readings
We are considering providing copy & paste solution
19 Windows Phone Microsoft Corporation.
19. Cloud and
Integration
Services
Software App
Model
UI
Model
Foundation Software
Foundation
Hardware
Foundation
20. Run-time improvements
Silverlight 4 Features Performance
• Implicit styles • Sockets • Gen GC
• RichTextBox • Clipboard • Input thread
• ViewBox • IME • Working set
• More touch • WebBrowser • Profiler
events (IE9)
(tap, double • VideoBrush
tap)
21 Windows Phone Microsoft Corporation.
21. Networking
Sockets
TCP
UDP unicast, Multicast ( on Wi-Fi)
Connection Manager Control
Overrides and sets preferences
(e.g. Wi-Fi or cellular only)
HTTP
Full header access
WebClient returns in originating thread
22 Windows Phone Microsoft Corporation.
23. Silverlight and XNA Shared Graphics
XNA inside Silverlight App
Integration at Page Level
XNA takes over rendering
Integration at Element level
Silverlight elements in XNA
pipeline via UIElementRenderer
Shared input
27 Windows Phone Microsoft Corporation.
25. Local database
SQL Compact Edition
Use object model for CRUD
LINQ to SQL to query, filter, sort
Application level access
Sandboxed from other apps
Uses IsolatedStorage
Access for background agents
DatabaseSchemaUpdater APIs SQL CE
for upgrades
29 Windows Phone Microsoft Corporation.
26. Database APIs: Datacontext and attributes
// Define the data context.
public partial class WineDataContext : DataContext
{
public Table<Wine> Wines;
public Table<Vineyard> Vineyards;
public WineDataContext(string connection) : base(connection) { }
}
// Define the tables in the database
[Table]
public class Wine
{
[Column(IsPrimaryKey=true]
public string WineID { get; set; }
[Column]
public string Name { get; set; }
……
}
// Create the database form data context, using a connection string
DataContext db = new WineDataContext("isostore:/wineDB.sdf");
if (!db.DatabaseExists()) db.CreateDatabase(); Windows Phone Microsoft Corporation.
27. Queries: Examples
// Find all wines currently at home, ordered by date acquired
var q = from w in db.Wines
where w.Varietal.Name == “Shiraz” && w.IsAtHome == true
orderby w.DateAcquired
select w;
Wine newWine = new Wine
{
WineID = “1768", Name = “Windows Phone Syrah",
Description = “Bold and spicy"
};
db.Wines.InsertOnSubmit(newWine);
db.SubmitChanges();
Windows Phone Microsoft Corporation.
29. Cloud and
Integration
Services
Application App
Model
UI
Model
Model Software
Architecture
Hardware
Foundation
30. Fast Application Resume
Immediate Resume of recently used applications
Apps stay in memory after deactivation
New “task switcher”
Long-press back button
While dormant
Apps are not getting CPU cycles
Resources are detached
You must recompile and resubmit targeting Mango
34 Windows Phone Microsoft Corporation.
31. Mango Application Lifecycle Fast App Resume
Resuming .. .
Restore state!
State preserved! running
IsAppInstancePreserved
IsAppInstancePreserved == Save State!
== false
true
activated deactivated
Tombstone Tombstoned dormant Phone resources detached
the oldest Threads & timers suspended
app
Windows Phone Microsoft Corporation.
33. Multi-tasking design principles
Delightful and Battery
Responsive UX Friendly
Health
Never Regret Network
App Install Conscience
Integrated Feel
UX Hardened
Services
39 Windows Phone Microsoft Corporation.
34. Multi-tasking Options
Background Transfer Service
Background Audio
Background Agents
Periodic
On Idle
Alarms and Reminders
40 Windows Phone Microsoft Corporation.
35. Background Audio
Playback
App provides URL or stream to Zune
Audio continues to play even if app is closed
App is notified of file or buffer near completion
Phone Integration
Music & Video Hub
Universal Volume Control (UVC), lauch app, controls, contextual info
Contextual launch – Start menu, UVC, Music & Video Hub
App Integration
App can retrieve playback status, progress, & metadata
Playback notification registration
41 Windows Phone Microsoft Corporation.
36. Background Audio App Types
URL PlayList
Provide URL to play
Pause, resume, stop, skip-forward, skip-backward
Stream Source
Provide audio buffers
Custom decryption, decompression
Requires app to run some code in background
42 Windows Phone Microsoft Corporation.
37. Background Agents
Agents
Periodic
On Idle
An app may have up to one of each
Initialized in foreground, run in background
Persisted across reboots
User control through CPL
System maximum of 18 periodic agent
Agent runs for up to 14 days (can be renewed)
44 Windows Phone Microsoft Corporation.
38. Generic Agent Types
Periodic Agents On Idle Agents
Occurrence Occurrence
Every 30 min External power, non-cell network
Duration Duration
~15 seconds 10 minutes
Constraints Constraints
<= 6 MB Memory <= 6 MB Memory
<=10% CPU
All of this is requirements can change before RTM, but should not change too much
45 Windows Phone Microsoft Corporation.
39. Background Agent Functionality
Allowed Restricted
Tiles Display UI
Toast XNA libraries
Location Microphone and Camera
Network Sensors
R/W ISO store Play audio
Sockets (may only use background audio APIs)
Most framework APIs
46 Windows Phone Microsoft Corporation.
41. Notifications
Time-based, on-phone notifications
Supports Alerts & Reminders
Persist across reboots
Adheres to user settings
Consistent with phone UX
48 Windows Phone Microsoft Corporation.
42. Alarms vs Reminders?
Alarms Reminders
• Modal • Rich information
• Snooze and Dismiss • Integrates with other reminders
• Sound customization • Snooze and Dismiss
• No app invocation • Launch app
• No stacking • Follows the phones global settings
49 Windows Phone Microsoft Corporation.
44. Background Transfer Service
Start transfer in foreground, complete in
background, even if app is closed
Queue persists across reboots
Queue size limit = 5
Queue APIs (Add, Remove, Query status)
Single service for many apps, FIFO
Download ~20 MB ( > over Wi-Fi)
Upload Size ~4 MB (limit to come)
Transfers to Isolated Storage
53 Windows Phone Microsoft Corporation.
45. Cloud and
Integration
Services
Integration App
Model
UI
Model
Services Software
Architecture
Hardware
Foundation
46. Live Tile improvements
Local Tile APIs
Full control of ALL properties
Multiple tiles per app
Create,Update/Delete/Query
Launches direct to Uri
56 Windows Phone Microsoft Corporation.
47. Live Tiles – Local Tile API Continued…
Back of tile updates
Full control of all properties when your app
is in the foreground or background
Content, Title, Background
Content Content
string is Background
bigger
Title Title
Flips from front to back at random interval
Smart logic to make flips asynchronous
Windows Phone Microsoft Corporation.
49. Push Notifications (Core) Enhancements
Reliability Efficiency Performance
• New TDET • TLS resume for • Faster state
mechanism for sessions within 8 machine for faster
broader network hours client service
compatibility • Hints for • Smarter queue
• Lowered polling improved radio logic for less
interval for non- dormancy redundancy
persistent • Concurrent tile
connection downloads for less
friendly networks radio uptime
59 Windows Phone Microsoft Corporation.
50. Push Notifications – New Features!
MultiTile/Back of Tile Support
Can update all tiles belonging to your application
No API Change! – BindToShellTile now binds you to all tiles
Send Tile ID to service and use new attribute to direct update
3 new elements for back properties:
BackBackgroundImage, BackContent, BackTitle
Deep Toast
Take users directly to an application experience
Uses standard SL navigation (OnNavigatedTo)
No API change! – BindToShellToast still all you need.
New element to send query parameters with a toast: Param
Windows Phone Microsoft Corporation.
51. Extras
Integration point between Bing Search and 3rd party apps
User launches 3rd party from Bing Search – search
parameter is passed to the app
Four item types:
Movies
Places
Events
Products
61 Windows Phone Microsoft Corporation.
52. New Choosers and Launchers
SaveRingtoneTask
AddressChooseTask
BingMapsTask
BingMapsDirectionsTask
GameInviteTask
Updates:
EmailAddressChooserTask
PhoneNumberChooserTask
63 Windows Phone Microsoft Corporation.
53. Contacts
Read-only querying of
contacts
Third party social data
cannot be shared
Requires
ID_CAP_CONTACTS
65 Windows Phone Microsoft Corporation.
54. Calendar
Read-only querying of calendar
appointments
Returns a snapshot (not live data)
You must refresh manually
Requires ID_CAP_APPOINTMENTS
69 Windows Phone Microsoft Corporation.
55. Appointments API
Appointments appointments = new Appointments();
appointments.SearchCompleted += new
EventHandler<AppointmentsSearchEventArgs>((sender, e) =>
{
... = e.Results;
});
Start date and time
// 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 Windows Phone Microsoft Corporation.
56. What are Search Extras?
Added functionality 3rd party apps provide for Bing items
Four item types:
Movies
Places
Events
Products
Windows Phone Microsoft Corporation.
57. Three Easy Steps to Implement Search Extras
1. Update your app’s Manifest
Use the Extensions element
One child Extension element for each category your app supports
Your app will appear in those items!
This is a great way to drive downloads if your app isn’t yet installed
2. Add an Extras.XML file to your XAP
Specify captions for each Bing category
3. Accept Context to automatically open the item in your app
Create a SearchExtras page that accepts parameters.
Search for the item using the parameters passed to your app.
Windows Phone Microsoft Corporation.
58. Call to Action
Download the tools at http://create.msdn.com
7.5 allows you to build deeply integrated
phone experiences – build them into your apps!
Multitasking opens up completely new experiences
Integration points are a key way for your app to shine
73 Windows Phone Microsoft Corporation.
59. Atley Hunter, MCSD, MCDBA, MCPD
MVP Windows Phone Development
Twitter: @atleyhunter
Blog: www.atleyhunter.com
This slide could be presented as “now that we know which sensor might interest you, here’s a more technical description on what each sensor is”
Compass demo under Sensors directory..
Barcode reader for live stream , or File Sink demo (for video) or PhotoFun for camera (photos) … All under the camera folder in demos..
Gyrohas drift ( indicates rotation even when device is stationary)..
Sorry, we don’t have one. No Windows Phone 7 phones support this and I don’t have a newer phone
Emphasis on the fact that motion is a very accurate sensor when it comes to device orientation
Compass demo under Sensors directory..
KEY TAKEAWAY: Use Motion sensor instead of compass or gyro when availableRemember that the motion sensor is good for orientation, not translation. Translation (measuring distance travelled) is still a difficult problem. Why is it more accurate? Compass suffers from great inaccuracies in orientation, often more than 20 degreesCalibration issuesExternal magnetic forcesSignificant lagGyro suffers fromDrift in it’s data (data indicates rotation even when device is stationary)Accelerometer suffers fromDriftMotion sensor algorithm compensates for inaccuracies in each independent sensor.
Where applicable,the APIs are compatible with Silverlight on the desktop. SL4 on desktop does not support Unicast. ---Connection Manager is WP component that manages connections on the phone.CM will connect in the following priority order:Desktop passthroughWiFiCellularYou can override this using the Network Preferences APIYou can figure out what type of data network the phone is using: 3G vs EDGE. Etc.
Silverlight
Chat 2.0 allows you to send text peer to peer using UDP (requires two phones) Shared Pad (also known as Chat Plus allows you to share a drawing pad .. Across IRC sockets is the same demo we demonstrated at MIX keynote. Note that it requires credentials and connecting to a real IRC server.
XNA Model Viewer shows XNA models mixed with Silverlight controls (mostly buttons) .. XNA
No direct SQL or DDL statements Database is specific to an app ( UI + agents can acesss but no other app can access) DatabaseSchemaUpdater is transactional ..
ConstraintsOnly one is active at a time
IMDB or MSN Extras or (if showing code) TreyResearch Task..
EmailAddressChooser and PhoneNumberChooser now return display name.