Bitesized tidbits for building Modern (Metro) apps.
The Mystery of the Disappearing Images in the Emulator
July 9, 2013Posted by on
While I was working on In Two (a great game by the way, you should check it out), I was working on one feature that allowed the user to set their profile picture, which involved letting them either choose a photo from one of their many, many albums, or taking a new picture. Most of the development of that game was done using the emulator, which was no problem, I thought, as I knew the emulator came with stock images for you to use. But every time I went to choose an image from my app, all I had was the empty camera roll folder, no stock images.
My initial solution for this was to build a quick, simple app that would save an image to the image gallery so my app could use it, all the while, still cursing that there were no stock images in the WP8 emulator. And this worked well. Now, I could give you the project so you have images, or I could tell you the weird discovery I made.
The images are there. But weirdly, you have to go into the Photos hub first in order for them to then become available for your app to choose from. It’s as simple, and stupid, as that! Just go into it, then come straight back out and you’ll get them showing in the emulator.
Hopefully this will stop others trying to work out how to use images in their app using the emulator.