One of the factor for successful app is – continuous feedback from user. Even though, you anticipate all the possible bugs, once the app is on store, you’ll never know what can go wrong and when your app can crash on the user. You may want to know: how many users are using your app, when they are using, how they are using, what features they are using or if the app crashes, when, why and how it crashed. These analytics can help you to engage more with the audience and deliver great apps.
Thanks to Xamarin Insights, which was introduced in Evolve 2014. Using Insights, you can easily track down all these scenarios.
To get started visit https://insights.xamarin.com/ and create a new app.
Insights is supported on Android, iOS and Windows/Phone apps. Using NuGet package, add Xamarin.Insights NuGet Package.
Once you add this package, you need to initialise the Xamarin.Insights by using following code:
Just remember, you need to initialise Insights before any exception can occur. For example, in case of iOS in Main, in case of Android in OnCreate of startup activity and in case of Windows in Launch event.
After this, whenever there will be any unhandled exception, it will be reported on the dashboard. To simulate this behaviour, lets add a button on screen and catch the exception and report it explicitly.
As you can see, above code will raise IndexOutOfRangeException. Now, if you run the app in ‘release’ mode on ‘device’, it should show all these exceptions on Dashboard.
Now, if you click on individual exception, you can see more details (incl. stack-trace) for that exception. This will also tell you more details about device on which app is running, the version of the device OS and other details.
On this dashboard, you can go to Users tab and see individual user actions and how they received those exceptions.
Insights give you APIs to report more details related to Users (individual user details like name, email id, etc…), their actions or traits (clicked on some button, navigated to some tabs, etc…) and also to add more details to exceptions. It can also send you email for individual issues. So, if there is any issue with high-priority, you’ll receive a notification mail and get notified about it. Insights, also allows you to integrate with HipChat, Jira, Visual Studio Online to get notified about issues.
Using Insights, you can easily engage more with your audience. If user is facing any issues, you can get notified about those issues. And once you solve those issues, you can contact user about updates. This will help your users to use your app more frequently while making it a successful app.
You can find more details about Insights at: https://insights.xamarin.com/docs or http://xamarin.com/insights
Hope to see more apps with Insights and user engagement.
2 thoughts on “Revisiting Evolve – Insights”
Thanks for the blog post.
Do you know if it’s possible to globally handle unhandled exceptions? In WP 8.1 this is possible but I don’t think Xamarin iOS/Android supports this.
If not do you think having try/catch block in all event handlers dealing with databases/remote services/complex logic/… is a good pattern?
For us this is important since an app crash is really the worst thing for a user.
As I understand, you’re comparing this with exception handling in app.xaml.cs. I will not recommend handling exception at global level. However, it can be the last chance for us as developers to log it. Having said that, do show a nice screen about error to the user. It will help you to get good reviews/feedback.
I will suggest you to go with try/catch block wherever there is a chance of exception. There is a nice article, which is old, but still valid on structured exception handling. You can find it here: http://support2.microsoft.com/kb/816157