I've come across a nasty bug when using openPhotoGallery() where accessing the returned media.nativePath causes a NullPointException. Now, this only happens when the selected media, for some reason, appears to become a remote media (i.e. after automatic backup of Photo Gallery).
Even weirder, if I use an ImageView to display the image, it is displayed correctly. Initially I hit the bug when trying to upload the selected image. I was then able to reproduce the bug with this minimal code:
1. Create a new Default Alloy Project
2. Replace the initial doClick() function, within index.js:
3. Select a picture (using Google Photos, now the default on Android L) that has been backed up to the Cloud
Output for a picture before it has been backed up / local picture:
Output for a picture after it has been backed up / remote picture: