Author Archives: codolutions

Diagnostics for Android apps

Let’s assume you have got a great Android app, how do you go about diagnosing problems users have with it? One big problem with mobile apps is the fact that it is gone out of your hands and you can’t see what’s happening when things go wrong.

Ideally, you would ask the user to send you some logs, but it is not as easy as it should be. Some time ago you could install an app that would read logs for you, but in a fairly recent versions of Android they can only see their own logs which is not very useful. You could ask users to root their device, or install developer toolkit and use ADB. Good luck trying. This is when a simple diagnostic tools could be helpful, if it allowed users to send your application’s logs back to you. Please meet diagnostic-tools.

Here you have a jar file you should add to your project, which will give you a LogCollector. This class can read application logs and send them in an email with some information about the runtime environment. It actually doesn’t send email, it prepares it and lets user decide how to send it. Give it a try by installing the demo app or building it from source code.

What you need to do is (refer to the demo app if something is not clear):

Add this jar file to your Android project. You can also build it yourself from source code. However, the demo app defines a project dependency instead.

Add a provider as shown below to your application. This is needed by FileProvider to share the log file with the email sending app as an attachment.

<provider android:name=”android.support.v4.content.FileProvider” android:authorities=”com.codolutions.diagnostics.demo.fileprovider” android:exported=”false” android:grantUriPermissions=”true” >
<meta-data android:name=”android.support.FILE_PROVIDER_PATHS” android:resource=”@xml/file_provider_paths” />
</provider>

Add the XML file mentioned in the configuration above, which specifies the path for the files exported by this provider.

<paths xmlns:android=”http://schemas.android.com/apk/res/android&#8221; >
<files-path name=”files_dir” path=”.” />
</paths>

And finally, when you want to send logs, call the log collector.

mLogCollector.collect();
mLogCollector.sendLogs(“info@codolutions.com”, “Error Log”, “Hey there, here is your log!”, “Some extra information, just because you wanted.”, “com.codolutions.diagnostics.demo.fileprovider”);

Just one more thing that could be useful: If you are lucky enough to spot the issue and fix it, you go ahead and upload a new version, but there is no guarantee users will opt-in to your fix. One thing that can help with that is a kill switch. Using the kill switch you can remotely disable particular versions of your app and force users to upgrade to the latest. I’d recommend you to have at least a very basic kill switch from day 1, you never know when you are going to use it.

Credits: I have borrowed some code from https://code.google.com/p/android-log-collector/.

Catch UP

I have a couple of friends in Facebook, Google+, Twitter, Foursquare, etc. I try to catch up with them once in a while, but I always miss important stuff and life events because I don’t check frequently enough. If this describes you as a social network user, you will probably want to check Catch UP out. Catch UP aims to bring the most important stuff from different networks in a single place, allowing you to make sure you don’t miss updates from your family members or best friends. There are a few similar applications out there, but we thought we can give it a try and learn more about social networks along the way.

How it works

  • You connect your social accounts, via OAuth (no password entered in the app)
  • You select a list of people you would like to filter your feed with
  • In separate dashboards you will see your own posts, and updates coming from your list
  • You will see the hot items, those who attracted a lot of attention, in a separate dashboard
  • You can see how connections in your list have been engaged with your own or each others’ posts
  • You can get notifications about new updates from your list

Considerations

  • We plan to provide this for free, for all the users. The base functionality will be free of advertisement and free of charge, forever.
  • We will provide some extra features for a price, expecting a percentage of users to take them up, covering some of the development and running costs.
  • In order to provide an acceptable experience for everyone, we might impose some limits in the app, since we have some infrastructure constraints and usage quota imposed by networks we connect to. We try our best to give users a better experience as we continue working on this.
  • It allows multiple accounts of the same network linked in the application. One of the problems of using multiple accounts is logging in and out all the time. Once these accounts are linked, they can be used at the same time with no switching required.
    It uses OAuth so that users authorize the access to their accounts without compromising their security (revealing their password).
  • We have made a decision to use browser-based OAuth flow, so that users can make sure they are securely connected to their social network website using their trusted browser. It eliminates the possibility of phishing attacks like this one.
  • It is not aiming to replace client apps for the social networks it connects to. It won’t end up implementing all the features of each social network either. All the posts displayed in the app link back to the original update and open in the native client of that network if one is already installed, which can be used for anything that’s missing here.

Final thoughts

catchup-logo-smallCatch UP is currently available on Android and Windows Phone only. iOS and web client is being considered, but nothing is planned as of now. Feel free to give us your feedback in order to make this a better product. What do you care about most? What do you want to see added to this next? You might ask, what is about the logo? It talks about the infinite cycle that you have to break somehow to get a living ;-)