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

In this post, I will continue with gathering user feedback but this time I will use HockeyApp portal instead of in-app feedback as I mentioned in previous post. Before the user can send feedback to me, it requires to create an invitation for the user then she needs to register a Hockey app account. Let’s create the invitation.

Open the app’s page on HockeyApp portal then click Invite User

Then enter user’s email address, select a role for her then enter message if you want and click Save. The invitation email will be sent to the user and it’s waiting for her acceptance.

It’s worth to note that there are 3 roles in HockeyApp (Developer, Member and Tester) and all of them can download app from HockeyApp (once it is published), install the app but there are some differents. Developers can view and edit all data of the app. Members can view all data and answer to feedback messages, but not edit the app or upload builds. Testers can download and install the app.

After receiving invitation email, the user need to register a HockeyApp account

by entering the information

then registering her devices

and provide feedback

After following above steps, you can start to gather feedback from HockeyApp portal, an alternative way of using in-app feedback.

At this time it’s weird as you can provide feedback without any “real” apps. No problem, in next blog I will show you steps to deploy the app to HockeyApp then your users can start to try it then provide “real” feedback. Stay tuned.

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.

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 😀

Getting started with Visual Studio Team Services

Visual Studio Team Services (VSTS) is a service from Microsoft which provides collaboration tools for teams, version controls (Git & TFS) and continuous integration. It’s great for a start-up or small company as they’re free for 5 users. In this post, I will introduce you the steps to start to work with VSTS.

After creating your account, let’s start with creating your project. Open Overview then click New

n01

Enter project name, select process template and version control you want to use then click Create project

n02

After waiting for VSTS to create new project, just click Navigate to project to open the project

n03

Now we move to Visual Studio (VS). Open Team Explorer pane then click Connect…

01.png

Let’s connect to VSTS, select Team Projects you want to work on then click Connect

02

After connecting to VSTS, just select the project you want to work on the click Clone Repository

03

After cloning the repository, you can create new or open existing solution on your PC to start to work

04

Once you finish above steps, you can commit the code to VSTS, create work items, start tracking them and create build configuration to do continuous integration. They will come in later posts.

How to fix “Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]”

It happened to me a few days ago. The problem was caused by using different versions of Android SDK build tool to build Xamarin.Android apps (at home I’m using v24.0.1 while at the office I’m using v23.0.3). It can be fixed by uninstalling the app manually (if it shows in application list) or re-building the app with the last Android SDK build tool you used then uninstall it manually (as the app is uninstalled improperly, it still in your device but doesn’t show up in application list). After that you can build with the other build tool.

But in the worst case the app doesn’t show up on your application list and you don’t want to waste your time to install the other build tool to just buid it to uninstall, the adb tool will be the rescuer if you follow below steps:

  1. Plug your device into your computer (Make sure you enabled Developer mode first).
  2. From command line, you enter “adb devices”. It should list all the “devices” (included emulators) are connected to your computer.
  3. Run “adb -s {DEVICE_ID} uninstall {APP_PACKAGE_NAME}” with {DEVICE_ID} is the device’s id you can get from second step and {APP_PACKAGE_NAME} is application package name.

adb tool will uninstall the app then you can build your app with new build tool.

2 ways to resolve Unsupported major.minor version 52.0 when building Xamarin.Android app

After reinstalling Windows 10 on my PC, I also update the Android SDK Build-tools to lastest version (24.0.1 at this time) and I cannot build Xamarin.Android app successful as Visual Studio shows me an error message “Unsupported major.minor version 52.0”. Googling about it, I found that it is compatible problem of JDK and Android SDK with version 52.0 means it relates to JDK 8

To resolve this problem, there are 2 ways to do it.

Upgrade to JDK 8: I prefer this way as on Windows 10 64-bit, Android Studio will run 64-bit version by default and it cannot use JDK 7 32-bit which is installed together with Visual Studio 2015. So I download JDK 8 64-bit, install it then update Xamarin configuration

VS Configuration

Stick with JDK 7: You need to uninstall Android SDK Build-tools version 24.x.x and install version 23.0.3 (if you didn’t it yet)

Android SDK