Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone - PhotoChooserTask not showing

I'm having a problem with this PhotoChooserTask because it's not showing up when I deploy it on my device. It's working though in Emulator. I made a very simple code but am not sure why it's not showing.

// inside the button
PhotoChooserTask selectphoto = new PhotoChooserTask();
selectphoto.ShowCamera = true;
selectphoto.Completed += new EventHandler<PhotoResult>(selectphoto_Completed);
selectphoto.Show();
// -------------

void selectphoto_Completed(object sender, PhotoResult e)
{
    if (e.TaskResult == TaskResult.OK)
    {
        // blah blah blha
    }
}

any idea?

I'm using Windows Phone 7 Mango (7.1)

------ update ----

I took the e.TaskResult and I always get "Cancel". Is there something wrong?

I got an idea... maybe because Zune is running :P

--- update -- solved. Zune is running :P

like image 441
Jayson Ragasa Avatar asked Apr 06 '12 18:04

Jayson Ragasa


1 Answers

It's now always good to test your app on actual device if you're working or implementing Camera or PhotoChooserTask and you are connected in Zune.

So before deploying your app onto your actual device with media capabilities, make sure to disconnect your phone to Zune.

like image 113
Jayson Ragasa Avatar answered Oct 12 '22 09:10

Jayson Ragasa