December 21, 2011 at 2:25 AM
—
dsoltesz
Its always good practice to have proper error handling in your application and a way for users to report the errror. Recently I learned of a new service called http://www.bugsense.com. BugSense is a library made for mobile developers. Get the context of the errors, track errors in specific app version or filter errors by device. There was Internet connectivity at the time of the crash? BugSense collects all the information the mobile developer needs and create reports for you to easliy be able to track and resolve application errors. Using BugSense in your Windows Phone 7.x application is super easy and its FREE! Start with installing the BugSense library for Windows Phone. Use NuGet by typing “Install-Package BugSense.WP7” to NuGet Console or Search for BugSense using the NuGet Package Manager UI or download the BugSense-WP7-v0.9.zip unzip and add a reference to BugSense.dll in your Windows Phone Project.
Then, all you need to do is go inside you App.xaml.cs file and add the following code inside the constructor: Don't forget to use your Project API key you'll find in your dashboard!
public App()
{
BugSenseHandler.Instance.Init(this, "Your_API_Key");
// You app's code
}
I have in corporated bugsense into my nightly prayer application and its working great!!!
November 23, 2011 at 7:03 PM
—
dsoltesz
I recently created my first wp7 app http://www.windowsphone.com/en-US/apps/3ca7bb09-7710-4114-bb97-62d2657c7e95. I did something simple just to see what it took to build an app and go through the market place app submission process. I spent about a week creating this app. That includes setting up a dev machine, creating database and admin app to manage data, web services that the phone can talk to and then building of the actual app. This app was built using MVVM design pattern and this MVVM Framework I mentioned in this post http://www.dansoltesz.com/post/2011/11/14/Windows-Phone-7-MVVM-Framework.aspx
While this app is simple in nature, it uses several core features that any app would need. It handles proper tombstoning, page navigation with nice transitions, communicates with external services, uses ad control with location services, context menu support, application button and menu databinding,splash startup screen, proper error handling and reporting, background services and live tile updates and several windows phone 7 tasks for emailing and sharing.
In order to have my app ready for the submission process, I used the new windows phone 7 market place test kit that was available with the mango sdk. This proved priceless in helping to identify any potential issues before submitting the app to the market place. The biggest issue I ran into is having a fast startup time. Per the certification process your app has to have the main page visible within 5 seconds. This seems pretty easy to do but when your initializing viewmodels, databinding UI, using Panorama view which supports multiple UI's, checking data connections and connection to services, 5 seconds goes by pretty quick. My first test was well over 5 seconds so I started doing some refactoring, added in splash screen that enabled my real main page to get loaded properly and when all was said an done, the app launches ina few seconds on average.
Please check out the app and let me know of any issues or improvements and if you would like any details of anything, just ask.
November 16, 2011 at 11:41 PM
—
dsoltesz
I have been working with windows phone 7 recently and i want to be able to serialize an object to xml to save into isolated storage. Here is a Isolated storage helper that will allow you to do jus that.
public class IsolatedStorageHelper
{
public const string MyObjectFile = "myObject.xml";
public static void WriteToXml<T>(T data, string path)
{
// Write to the Isolated Storage
var xmlWriterSettings = new XmlWriterSettings { Indent = true };
using (var myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
using (var stream = myIsolatedStorage.OpenFile(path, FileMode.Create))
{
var serializer = new XmlSerializer(typeof(T));
using (var xmlWriter = XmlWriter.Create(stream, xmlWriterSettings))
{
serializer.Serialize(xmlWriter, data);
}
}
}
}
public static T ReadFromXml<T>(string path)
{
T data = default(T);
try
{
using (var myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
using (var stream = myIsolatedStorage.OpenFile(path, FileMode.Open))
{
var serializer = new XmlSerializer(typeof(T));
data = (T)serializer.Deserialize(stream);
}
}
}
catch
{ //add some code here
}
return data;
}
}
To save your object call
IsolatedStorageHelper.WriteToXml(MyObject, IsolatedStorageHelper.MyObjectFile);
To fetch your object
var myObject = IsolatedStorageHelper.ReadFromXml<MyObject> (IsolatedStorageHelper.MyObjectFile);
November 14, 2011 at 7:04 PM
—
dsoltesz
I have recently starting building a new windows phone 7 application and I was looking for a nice MVVM framework to use. After reviewing several frameworks, I decided to go with UltraLight MVVM framework. This is a great light weight framework for developing MVVM Silverlight applications with support for tombstoning on the Windows Phone 7.
UltraLight.mvvm provides a quick, easy and light way to add the following features to your Windows Phone 7 applications:
- Commands
- Command binding for buttons (with parameters)
- Support for binding commands to application buttons / menu items on the application bar
- Dialogs, both notification and confirmation
- Messaging using the event aggregator publisher/subscriber model
- Service location
- Design-time friendly view models
- Tombstone-friendly view models with control hooks for tombstone events
- Decoupled navigation support from the view model
- Decoupled visual state support from the view model
- Back button interception on the view model
- Notify property changed using expressions instead of magic strings
- Dispatcher helper for UI thread access