Select a language to translate this page!
Powered by Microsoft® Translator
This blog post was authored by Rahul Bagaria, a program manager on the Windows Phone developer tools team.
Consumers and businesses are increasingly becoming dependent on the continuous connection of smartphones to networks. However, there is a side effect that stems from such pervasive network connectivity, which is often termed as bill shock for smartphone users. Users are frequently billed unexpectedly high connection fees due to their bandwidth use, which most of the time is a result of using apps that download data that is not necessary and are frequently bandwidth inefficient. It leads to a bad user experience, which is going to increase as more enterprises integrate apps in workplace operations. Additionally, the emergence of 4G will compel users to stay permanently connected.
High bandwidth usage is not the only network problem experienced by users; let's look at some of the other problems stemming from poorly designed apps:
As a developer, it makes sense to design network-efficient and energy-efficient apps, which ultimately leads to good user experience and better ratings and reviews. It means a user should be able to run these apps without any worry of it draining the battery unexpectedly, or leading to bill shock or unresponsiveness. Here I present a new tool called Network Monitoring which will allow you to visualize how network efficient your apps are and optimize them to efficiently consume fewer resources.
Before we go into further detail, let's review our typical photo app which, we had seen when exploring Simulation Dashboard (check out the PhotoSlydr app which was optimized using the following steps):
I just ran the app, selected an album, and explored it on the next page. I tried using both 3G and Wi-Fi using the Simulation Dashboard to understand the difference in user experience and network information. Here are the results:
The information we can glean from the summary is that our app downloaded 6.44MB of data just for browsing a photo album, which will be extremely heavy on the pocket of a budget-conscious user and will take loads of time to download on low-speed networks. Clicking the Alerts section, we come to the Graphs page:
As you will notice, there is a Network data transfer graph (5th graphic in the image above) that displays the network usage of the app in both uploads (purple) and downloads (green). There are also some network markers in the External events section at the top, which are distinguished by their blue color. These markers identify user-triggered Network Simulation Changes (in this case we had first 3G Good and then Wi-Fi Good in the scenario.) It is clear that the download speed was low during the 3G scenario, which immediately increased as we switched to Wi-Fi.
As first steps, we can easily identify and use smaller resolution images from the Flickr API to download thumbnail images, which are sufficient for browsing the album. Later on, we can also customize our code using Data Sense APIs to adapt to the device network type and choose higher resolution images for Wi-Fi networks to provide a better experience. When I made these enhancements and ran the app again on a simulated 2G network, I could clearly see how the app performed efficiently, even at such low speeds:
Data downloaded decreased to 0.77MB, which was a significant improvement that led to lower battery and memory use. Users can effectively use the app over 2G networks too!
As another example, let me show you a different app published in the Windows Phone 7.5 Marketplace called Artify (used to convert images into ASCII Artwork). When I upgraded to Windows Phone 8.0 and ran under App Monitoring, it gave me the following graphs:
The Network data transfer spikes that are shown in the graph represent the stage in the scenario when I tried to upload an artwork on my SkyDrive account after authentication. Hence, you will see purple spikes in the second half of the graph, indicating actual uploads to the server. The largest spike occurred because of an actual upload (also indicated by the external event marker at top, which says that I performed a Tap on the Upload button).
By recognizing common issues found in typical apps that need to connect to the Internet to transfer data or use web services, you can identify the same issues in your apps and solve the issues efficiently. The following list provides common network issues:
The Network Monitoring tool is a useful accompaniment that you can use to identify, visualize, and fix network issues in your apps. In addition to the tool, there are some best practices as well, which can be followed based on the type of app and the target market. The following list provides some best practices for app developers:
In conclusion, ensure that you can limit the amount of time connected to the network and minimize the number of connections required for optimum network and energy efficiency and a great user experience.
Nice post.. I will give a try..
I'm getting error "Parsing log file failed." Can't see the results of analysis.
This exception I have found in temp directory in ProfilerLog_AppName3329592027.txt
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at SilverlightProfiler.Internal.CFAdapter.AddClassInfo(Double ClockTime, UInt32 ClassID, IManagedModuleInfo Module, UInt32 MdToken)
at SilverlightProfiler.Internal.CFAdapter.AddManagedFunction(Double TimeStamp, UInt32 FunctionID, UInt32 ClassID, UInt32 mdToken, UInt32 ModuleID, UInt32 ClassMetadataToken)
at SilverlightProfiler.Internal.CFAdapter.HandleEvent(UInt32 eventID, ProbeMarkerType eventMarkerType, Double clockTime, Double threadTime, UInt32 threadID, ThreadType threadType, List`1 eventInfoList)
at SilverlightProfiler.Internal.WPInputAdapter.HandleEvent(ProbeEventSource eventSource, UInt32 eventID, ProbeMarkerType eventMarkerType, Double clockTime, Double threadTime, UInt32 threadID, ThreadType threadType, List`1 eventInfoList)
at SilverlightProfiler.Internal.WPInputAdapter.HandleEvent(BinaryReader input, Int64 endOffset, ThreadStreamInfo threadStreamInfo)
at SilverlightProfiler.Internal.WPInputAdapter.ParseLogFile(BinaryReader input, String logFilename, AgLogFileHeader header)
at SilverlightProfiler.Internal.WPInputAdapter.Parse(Object data)
Such a Great Post. Thanks! :)
Thanks great...thanks for the article...Learn about top7 mobile apps of windows here top7mobiles.com/.../top-apps-for-windows-phone
Best features and most expected features in 2013 mobileupdate24.blogspot.com/.../the-most-expected-upcoming-features-of_27.html
Microsoft is releasing many <a href="www.developmobileapp.com/windows-mobile-application-developer.html">windows mobile apps</a> every day with many special features such as integration, apps running in full-screen, notification providing apps and many to make window 8 more interesting for mobile users. Microsoft also tries to remove the problems faced by the mobile user till now