The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[WPSL]MediaLibrary of a WP8 Silverlight app EMPTY when running on Windows Mobile 10 RRS feed

  • Question

  • Hi there!

    I started to test my apps on Windows Mobile 10 (Emulator) to make sure there are no compatibility problems. But I aready found an issue, which might be a bug in Windows Mobile 10:

    var mediaLib = new MediaLibrary();
    var picturesCount = mediaLib.Pictures.Count;
    // picturesCount is ZERO on WM10 device, but ~8 on WP8.1 device!!!

    The problem is that I'm using the Microsoft.Xna.Framework.Media.MediaLibrary class to access files from the phone. When I run this code on a WP8.0 or WP8.1 device/emulator, everything works fine and mediaLib.Pictures is not empty. Hence, accessing the pictures works without any problems.

    BUT when I run this code on WM10 emulator, picturesCount is 0 (zero) even when there are saved pictures.

    My questions:

    Is this a known bug?

    Will there be no support for Microsoft.Xna.Framework.Media.MediaLibrary when the app is running on a WM10 device?

    What would be the work around?

    Thank you for your time and help!

    Kind regards,
    Benjamin


    Monday, August 31, 2015 12:49 PM

All replies

  • Hello,

    Welcome to the Developing Universal Windows apps forum!

    Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools

    I have tested your app on the Windows Mobile 10 Emulator and Windows Mobile 10 Device, but I can not reproduce your issue in my side, I can get the correct picturesCount. Please make sure that you have added the IB_CAP_MEDIALIB_PHOTO in the list of capabilities.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, September 1, 2015 6:36 AM
  • Thank you for your answer.

    I already included the IB_CAP_MEDIALIB_PHOTO capability. The app (Photo Marker) is in the store since about 1 year so it was working up to now perfectly.

    I did some further investigations yesterday in the evening and installed Windows 10 Mobile on my device. This problem is not showing up when I run my app on my device (build 10166 and 10512). But it still happens when I run it on my emulator build 10240 (the one that was shipped with VS15 Community Edition).

    Unfortunately, I have now a related issue which happens on my real device but not in the emulator this time. When I open a picture using PhotoChooserTask, it works without any problems in the emulator, but the same app returns a Microsoft.Phone.Tasks.PhotoResult (TaskResult = Cancel, all other values: null) after selecting a picture.

    It's kind of confusing that some stuff works only in the emulator and some other stuff only on the real device...

    Tuesday, September 1, 2015 9:04 AM
  • Hello,

    >>But it still happens when I run it on my emulator build 10240 (the one that was shipped with VS15 Community Edition).

    I have tested on my Visual Studio 2015 Enterprise Edition, it works fine, I will try to run it on Visual Studio 2015 Community Edition to see if I can reproduce this issue.

    >>Unfortunately, I have now a related issue which happens on my real device but not in the emulator this time. When I open a picture using PhotoChooserTask, it works without any problems in the emulator, but the same app returns a Microsoft.Phone.Tasks.PhotoResult (TaskResult = Cancel, all other values: null) after selecting a picture.

    It seems that other community meets a similar issue as you in here:
    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/bfb80586-74d7-4590-9ff5-833e474ccffd/wpslcameracapturetask-not-function-at-all-in-windows-10-mobile-10512?forum=wpdevelop .

    I have already reported this issue to Microsoft, once there is any update, I will post it here.

    Thanks for your understanding.

    Best Regards,
    Amy Peng



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 10, 2015 3:12 AM
  • This bug seems to be fixed in Build 10549 :)
    Thursday, October 15, 2015 12:25 AM