Freigeben über


Epic Saga Chapter 4: Wherein I Discover Ripple and the Multi-Device Hybrid Apps Extension for Visual Studio

This post is the fourth post in the series: Uploading Images from PhoneGap/Cordova to Azure Storage using Mobile Services

In the previous chapter of this saga, I was frustrated at not being able to get the Eclipse IDE to even run on my laptop (although I had it running a few months back). After wasting an entire morning, I remembered that the Multi-Device Hybrid Apps extension for Visual Studio (let’s just call it Cordova extension for short) included an Android emulator and a bunch of other good stuff. This seemed to me the perfect time to try out this new x-plat offering from Microsoft—and I really liked it. In fact, I did a whole blog post on it: The Multi-Device Hybrid Apps extension for Visual Studio Kinda Rocks. Please read this post as I won’t be going over again all the goodness, this series is about me trying to get my Cordova app, which uploads raw JPEG binaries directly to Azure Blob storage, to run.

Although I had installed the Cordova extensions for Visual Studio just to get a working Android emulator, I thought “why not give the Ripple, Chrome-based emulator a try.” As I mentioned in my other post, Ripple supports both iOS and Android and can emulate several devices on each. Here’s the TodoList app running on Ripple as Android Nexus Galaxy:

Pretty cool…there’s geolocation and accelerator support, but what about camera support? The Android emulator (I thought) had camera support, but would Ripple? One way to find out.

I deployed my app to Ripple as Android Nexus Galaxy and tried to add a new item (which is supposed to then load the camera to take a capture). Uh oh!

image

I learned that I Haz Cheeseburger?!?! is really lolspeak for “Oops, Ripple couldn’t load a resource that you need.” Crud. You’re supposed to be able to pass in some success or response data, but I’ve never tried that. Instead, I clicked Success! , and wouldn’t you know, the app actually ran.

At this point, I ignored the previous error and was excited about my chances. I tried to upload an image and got this…

image

OK, so that previous obscure error must have been Ripple saying (as an lolcat) that it couldn’t load the capture plugin…no camera. But, check it out! Ripple was instead letting my choose a local file to upload and pretend that I just took the snap. Let’s Use selected file (a picture of a nice latte)…

image

Oh no!!!! Ripple also doesn’t support readAsArrayBuffer!!

image

Well, Ripple tried its best. Now, back to the Android emulator Sad smile

Stay tuned in for the next installment… Chapter 5: Wherein I learn to Hate the Android Emulator .

Cheers!

Glenn Gailey