Getting started with HockeyApp for Xamarin.Android apps – Gather user feedback – Part 1

In previous post, I told you the first step in getting started with HockeyApp for Xamarin.Android – Collect crash report. With just one line of code you can collect crash report then send to HockeyApp portal while it can be a tremendous task if you use other libraries. Now in this post, I will tell you about the next step in working with HockeyApp. It’s about gathering user feedback and it’s very simple also.

HockeyApp provides two ways to gather user feedback. One is in-app feedback, the other can be done via HockeyApp portal. With the first one, you need to add a button somewhere in the app, add a few lines of code then your user can start to send feedback. I’ll go through the steps to add in-app feedback first then I’ll show you how to add feedback via HockeyApp web portal in the other post.

Let’s continue with the project I used in previous post.

The first thing we need to do, as I said above, is adding a button to the app

Update the MainActivity.cs to open feedback activity when you click the button

Now let’s run the app and tap the Feedback button. HockeyApp find that it’s the first time you send feedback and open the form to enter the feedback

Just enter feedback then tap Send Feedback, it will be sent to HockeyApp portal.

On HockeyApp portal, as a developer, you can view

and reply user feedback

When user open feedback activity in the app, she can view your response

and also can reply to you

As you can see, as simple as in previous post, you can add in-app feedback feature to your Xamarin.Android app. It will provide an effective communication channel between you and your user to help to gather feedback to add new features/improve/fix bugs. In the next post I will tell you about distribute your app to users and gather feedback from HockeyApp web portal.

Advertisements

Getting started with HockeyApp for Xamarin.Android apps – Collect crash report

As you may know, after acquring Xamarin, Microsoft is replacing Xamarin Insights by HockeyApp and they also continue to work on Nuget package (current in beta) to help developer to integrate HockeyApp into Xamarin apps. This serie will help you to get started to work with HockeyApp in Xamarin.Android apps.

What is HockeyApp? HockeyApp is a service which provides beta distribution, crash reporting, user metrics and feedback gathering for Android, iOS, Xamarin, Cordova, React Native,… It plays an important role in Microsoft’s complete mobile lifecycle solution.

HockeyApp provides a free tier which supports 2 apps but you can buy other plans which support more apps. You can find more about them here.

It’s enough for introduction. Let’s start.

After creating an account (it’s too easy) you can add new app to HockeyApp immediately

As you don’t have the app yet, let’s select “Create the app manually instead”

Please select Platform (Android in this cases) and Release Type, enter app’s title in Title text box and app’s package name in Package Name field (it must match your Xamarin.Android app’s package name) then click Save.

The app will be created and you need to copy App ID to use later in your code.

Now it’s time to create the app. Open Visual Studio, select Xamarin.Android Blank App template as below, enter app name and select location to save the app then click OK.

Next step, you need to add HockeyApp from NuGet

At this time HockeyApp library for Xamarin is still beta (v4.1.0 beta 3) so you need to select “Include prerelease” check box to get it

Open MainActivity.cs then clean up the code before add code to register CrashManager with the App ID you get in above step. You can also see that in the button’s Click event, I throw an exception to make the app crashes

When you run the app and tap the button, the app will crash immediately. Next time you open the app, it will ask you to send crash report. Just tap Send Report.

After sending the crash report, you will see it on HockeyApp portal as below.

As you can see, with just one line of code you integrated HockeyApp library into your app and collect the crash report from testers.

In next blog, I will guide you through the steps to gather feedback from users.

Happy crashing 😀