9

The developer console for android has functionality for reporting runtime crashes if users decide to report a crash. Other frameworks has similar features that sends crash-reports without involving the user.

Does anyone know of a way to report installations or upgrades that has failed? With android 5.0 I am getting more and more user-reports of failed installs, but it is hard to obtain logs from non-technical users of my app.

nilsmagnus
  • 2,210
  • 23
  • 33
  • You have my sympathy; trying to debug a failed installation remotely is very tough. I never found a way to get useful information about failures, but if it's any help, I found that one or all of asking my users to (a) reboot the device, (b) connect over WiFi rather than cellular, (c) free up some space on the device solved most installation issues. – Matt Gibson Dec 01 '15 at 13:11
  • Did you try [ACRA](https://github.com/ACRA/acra)? – adnbsr Dec 10 '15 at 12:37
  • As i understand, ACRA cannot report failed installations automatically. Apart from that, It looks like it´s worth a look. Since it seems like it is impossible to do what I want, I will leave the bounty un-rewarded to any answers. I really hope goole will adress this issue since it seems close to impossible to find all root-causes for failed installations. I have summed up 3 of the installation-issues and solutions on my [blog](http://javanils.blogspot.no/2015/12/android-installation-issue-errorcode-505.html), but I think they cover only a minor subset of the causes of failed installations. – nilsmagnus Dec 13 '15 at 16:56

2 Answers2

2

You cannot detect whether or not an installation has failed yourself, because there is no way to execute code before your app is actually installed. So the logical app to do such a thing would be the market app triggering the install (i.e. Google Play). This not only knows when each installation starts, but also knows all details about the apk to report to the right developer.

Unfortunately however, Google play does not support this currently (as far as I know) and hence you cannot detect failed installs.

On older Android phones you could ask users is to install a "logcat app" and email the logs to you for analysis, but this will only work for devices older than Jelly bean. (Read this Link)

The best solution I can come up with (Mac only) is to ask users to install AndroidTool, press one button to generate a bugreport and email that to you. Not great, but for now the best you can do.

enter image description here

Jeroen Mols
  • 3,436
  • 17
  • 24
0

You can build an api that reports successful installation. Just call the api in onCreate of first activity. I don't think there is need to collect log on why the installation failed, is it needed ? You can do the same for upgrade, call an api one time from upgraded code.

syam
  • 892
  • 8
  • 19
  • 2
    The point is that I do not know the cause for the failed installation and users report different error-codes for failed installations. (Successful installations are not interesting in my case since everything seems to work fine. ) – nilsmagnus Dec 01 '15 at 12:09
  • Installing app and opening app is different operations. – savepopulation Dec 04 '15 at 12:33
  • I couldn't comment that's why I answered. Stack overflow is degrading – syam Dec 05 '15 at 09:47