   Make your app available on the widest range of WP devices possible.  Ensure users have a great experience with.

Download Report

Transcript    Make your app available on the widest range of WP devices possible.  Ensure users have a great experience with.



 Make your app available on the widest range of WP
devices possible.
 Ensure users have a great experience with your app
on all devices, and at all times.






















private void GetFixedFeatures()
{
Version v = Environment.OSVersion.Version;
bool g = Gyroscope.IsSupported;
bool a = Accelerometer.IsSupported;
bool c = Compass.IsSupported;
bool p = Camera.IsCameraTypeSupported(CameraType.Primary);
bool f = Camera.IsCameraTypeSupported(CameraType.FrontFacing);
int i = App.Current.Host.Content.ScaleFactor;
}
private void GetDynamicFeatures()
{
bool d = DeviceNetworkInformation.IsCellularDataEnabled;
bool r = DeviceNetworkInformation.IsCellularDataRoamingEnabled;
bool x = (DeviceStatus.PowerSource == PowerSource.External);
ConnectionProfile profile = NetworkInformation.GetInternetConnectionProfile();
ConnectionCost cost = profile.GetConnectionCost();
}
private void AddEventHandlers()
{
DeviceNetworkInformation.NetworkAvailabilityChanged += OnNetworkAvailabilityChanged;
NetworkInformation.NetworkStatusChanged += OnNetworkStatusChanged;
DeviceStatus.PowerSourceChanged += OnPowerSourceChanged;
PowerManager.PowerSavingModeChanged += OnPowerSavingModeChanged;
}







App/Agent Type
512MB device
1GB device
2GB device
51
60
80
Background Audio Playback
20*
25*
25*
Generic Background Agents
11*
20
20
Continuous Background
Execution
150
150
150
150/150/180
150/300/380
150/450/570
VOIP
Foreground App**



App/Agent Type
512MB device
1GB device
2GB device
VOIP
51
60
80
Background Audio
20
25
25
Bluetooth
16
16
16
VPN
10
15
15
100
100
100
10
10
10
5
5
5
WP8 Generic Background Agents
16
20
30
WP8.1 Background Tasks
16
30
40
Continuous Background Execution
150
150
300
Foreground App (WP8.0 context)
180
380
780
Foreground App (modern context)
185
390
825
Calendar Child/FileProvider Target
CachedFileUpdater/ShareDataPackage
Background Transfer

<!-- WP7 and WP8.0 WMAppManifest.xml -->
<Requirements>
<!--<Requirement Name="ID_REQ_MEMORY_90" />-->
<Requirement Name="ID_REQ_MEMORY_300" />
</Requirements>
<!– Ignored in WP8.1 -->
<FunctionalCapabilities>
<FunctionalCapability Name="ID_FUNCCAP_EXTEND_MEM" />
</FunctionalCapabilities>
<!-- WP8.1 AppxManifest.xml -->
<Prerequisites>
<m3:MinDeviceMemory>1GB</m3:MinDeviceMemory>
</Prerequisites>


94% of apps peak
at <150MB.
96% of apps
average at
<100MB.
Component usage (ballpark)
512MB
Total physical
512
Paging level
200
712
BSP
133
OS, drivers, services
300
OEM/MO service agents
22
VOIP or Background audio
51
Bluetooth
16
VPN
10
532
Foreground App, Back-stack, CBE, GBAs
180

App/Agent Type
Priority
Foreground App
2
VOIP
2
Background Audio
2
Bluetooth
2
VPN
2
Background Transfer
Calendar Child/FileProvider Target
CachedFileUpdater/ShareDataPackage Task
2 or 6*
3
3 or 6*
Continuous Background Execution
4
Geofence-triggered Task
5
WP8.0 Generic Background Agents
6
WP8.1 Background Tasks
6
// WP7.
long totalBytes = Microsoft.Phone.Info.DeviceStatus.DeviceTotalMemory;
long memUsageLimit = Microsoft.Phone.Info.DeviceStatus.ApplicationMemoryUsageLimit;
long currentMemUsage = Microsoft.Phone.Info.DeviceStatus.ApplicationCurrentMemoryUsage;
// WP8.0.
ulong committedLimit = Windows.Phone.System.Memory.MemoryManager.ProcessCommittedLimit;
ulong committedBytes = Windows.Phone.System.Memory.MemoryManager.ProcessCommittedBytes;
// WP8.1.
ulong usageLimit = Windows.System.MemoryManager.AppMemoryUsageLimit;
ulong currentUsage = Windows.System.MemoryManager.AppMemoryUsage;
MemoryManager.AppMemoryUsageIncreased += OnAppMemoryUsageIncreased;
MemoryManager.AppMemoryUsageDecreased += OnAppMemoryUsageDecreased;
private void OnAppMemoryUsageIncreased(object sender, object e)
{
switch (MemoryManager.AppMemoryUsageLevel)
{
case AppMemoryUsageLevel.High:
break;
case AppMemoryUsageLevel.Medium:
break;
case AppMemoryUsageLevel.Low:
break;
}
}
private void Init()
{
MemoryManager.AppMemoryUsageLimitChanging
+= OnAppMemoryUsageLimitChanging;
}
private void OnAppMemoryUsageLimitChanging(
object sender, AppMemoryUsageLimitChangingEventArgs e)
{
Debug.WriteLine(String.Format(
"AppMemoryUsageLimitChanging: old={0} MB, new={1} MB",
(double)e.OldLimit / 1024 / 1024,
(double)e.NewLimit / 1024 / 1024));
}
Resource
Microphone
Camera
Proximity
Gyro
Compass
Accelerometer
Vibrator
Push
SpeechSynthesis
SpeechRecognition
Audio
InterruptiveUI
Allowed?






























Device Participating tasks
Count
Cap
Max BG
Max FG
512MB
Background transfer
1
185
5
180
1GB
Background transfer
5
390
25
365


















http://aka.ms/Tfdyf7
http://aka.ms/To4as5
http://aka.ms/Jo85ot
http://aka.ms/Inx8pg
http://aka.ms/Rwt4ll
http://aka.ms/Y8fxim
http://aka.ms/J83ips