Tuesday, September 11, 2012

Advanced ACRA 2: Frequent errors detection

In my first ACRA post I wrote about detecting which Android versions generates the errors using Google Docs. This time I'll write on the most basic problem - finding which error happens the most. It is possible to group by full stack trace, however, the stack trace are not the same even on exactly the same errors. Instead, my approach is to compare the exception & the function that actually threw the exception. It might produce incorrect results if there are multiple similar exceptions.

Here's how it's done, open the Google Doc's ACRA spreadsheet:
  1. Rename the first sheet to 'Sheet1'
  2. Add new sheet
  3. In Cell A1 set text: "Short Stack"
  4. In Cell A2 set text: "=LEFT(Sheet1!P2,FIND("(", Sheet1!P2, 1))"
  5. Copy cell A2 to match the rows in Sheet1 (e.g. to cells A3, A4, A5, ...)
  6. Select column A in Sheet2, and create a pivot table ("Data" -> "Pivot table report...")
  7. In the pivot table sheet:
    • "Rows" -> "Add field" : "Short Stack"
    • "Values" -> "Add field" : "Short Stack", summarize by: "COUNTA"
Note: this list is for ACRA v4.2.3. With ACRA 4.3.0+ the 'Stack Trace' column might not be P

Monday, August 13, 2012

Eclipse autocomplete doesn't work

After formatting my computer I had to reinstall everything. When I started to work with my new Eclipse Juno on my Android project the autocomplete didn't work. It took my few searches on Google to find the answer, so I'll improve that page pagerank so others can find it faster. The answer is here.

Wednesday, August 8, 2012

Diagnosing repetitive BSOD

I had repetitive BSOD on my Windows 7 x64 Samsung laptop.

Here is the steps I think I should have taken (stop when the problem found):
1. Download Blue Screen View by Nir Sofer and check which driver cause the BDOS. If it's the same driver all the time - root cause found.

2. Memory check: (don't use the Windows 7 built-in memory check, it missed my problem) Download memtest86+ and check your physical memory. This tool might taken few hours to run.

3. Disk check: Run full disk check - open the disk in Windows Explorer, right click on the driver root, click on "Properties", than "Tools", under "Error Checking", check all check boxes and press on check now. After rebooting you can view the results in the "Events Viewer" under "Windows Logs" -> "Application", sort by "Source" column and search for "Wininit"

If nothing found so far, my best guess is  to backup the computer & re-format it. If the BDOS continues it's an hardware issue, otherwise it was some other software issue.

Thursday, August 2, 2012

Android SDK installation: Java not found

If you don't have Java installed - do that.
If you do, check the following:
  • Windows x64: The Android SDK is looking for Java 32bit. If you installed Java 64bit, install 32bit too.
  • In the Android SDK installer, try pressing "Back and "Next". Few people reported that this fix the problem.

Mobile application analytics

Just viewed this presentation from Google IO 2012, in which Google describe the new Google Analytics for mobile. The interesting part, is how they list what should be included in a mobile app analytics:
  • User acquisition - Where should I spend my marketing dollars?
    • Application store download - from which sources the download are coming (store search, web search, ad campaign, e-mails, referrals).
    • New users
    • Active users
  • Engagement - Once the user get your application how they are using it?
    • Engagement flow
    • Top app screens
    • Events
    • App crashed - A bit overlapping with the app store.
  • Outcome
    • App sales
    • In-app purchases
    • Ad-monetization 
    • Goal conversions

Thursday, July 12, 2012

Advanced ACRA 1: OS Version reporting

Assumption: ACRA is set and running.

Here's how to display in which Android OS version you get the most exceptions. If the exceptions distribution are different from Android OS distribution in the market - the issues might be OS version dependent.

You can use Google Visualization API as described here.

but there's a simpler solution - create a summary with-in the Google Docs spreadsheet.

Steps:
1. Open an active ACRA reporting spreadsheet (containing data).
2. On the main menu: 'Data' -> 'Pivot table report'
3. In the 'Report Editor' do:
3.1. Select: 'Rows' -> 'Add field' and select ANDROID_VERSION
3.2. Select (Optional): 'Columns' -> 'Add field' and select APP_VERSION_NAME
3.3. Select: 'Values' -> 'Add field' and select 'Timestamp'. Click on 'Summarize by' and select COUNT.
3.4. Select (Optional): 'Filter' -> 'Add field' and select APP_VERSION_NAME, and select which app versions to display

Wednesday, July 11, 2012

Few tips for Android (game) developer

Alternative title: What to do to NOT get NOT featured on Google Play

Here are the main headlines from Google I/O 2012 - Ten Things Games Developers Should Know talk.
  1. Very that your app works on the latest version of Android & high-res devices. Verify you're using relevant features for the latest version (not comparability mode).
  2. Try to stop pirates & vampires.
    Pirate - steal software. Google solution: use LVL - License Verification Library.
    Vampire - steal bandwidth. Google solution: don't download large resource files - use APK expansion files.
  3. Don't mess with the buttons. Make the 'Back' button behave as the user expect.
  4. Respect the life cycle. When a device is locked/exited/etc - pause your game. When your game is paused, don't play music.
  5. Minimize permissions. Bad permissions: (1) change wifi settings, (2) Receive boot completed, (3) Query running tasks, (4) Obtain fine location, (5) Read system log, (6) Directly call phone numbers, (7) Read/write contacts/calendar, (8) Read/write bookmarks, (9) Display system level alerts & (10) Send/receive SMS.
  6. Conserve resources. Minimize battery, memory, storage, bandwidth. Use the APK expansion files in-place, don't unpack them & delete (the Google Play will re-download it).
  7. Play by the rules of Google Play. (1) No payment providers other than Google Play, (2) Don't upload an app that downloads another app (e.g. alternative app store), (3) Don't bribe customers for 5-stars reviews.
  8. In app payments problems. For example: you app is asleep when the billing message arrives. The correct way for in-app billing: the in-app billing service should directly persist the purchase information to a storage, and your app will read it from the storage.
  9. Testing: Input devices, Form factor, OS Version. Driver stack & GPU hardware.
  10. Play listings. Problem with the listings, images that do no fit small screens (small subtitles).