3

My app has been chugging along happily on Android Kitkat and below. However I started getting complaints from Android L users that it crashed on their device.

A surprising thing happened while debugging my app on Lollipop. While the debugger was attached to the app (i.e. I ran the app from Eclipse) the app didn't crash.

However when I killed the debugger and ran the app on the emulator, it crashed.

I discovered that Android L was inserting an intent.

I was only checking whether the bundle extra wasn't null. It wasn't, so when I tried to access my intent, the app crashed.

I tried to log that extra and received

{profile:0}

My question is, why does this happen on Android Lollipop? This doesn't happen in any other Android version.

Bilbo Baggins
  • 3,644
  • 8
  • 40
  • 64

1 Answers1

2

Since Android Lollipop, you can use Managed Profiles for Enterprises.
So far I didn't find a way of extracting "profile" key name from Android SDK, so I need to hardcode it :(

gary0707
  • 313
  • 1
  • 3
  • 10