windows-phone-8 - 如何以编程方式在Windows Phone 8中创建相册文件夹

标签 windows-phone-8

我已经看到许多有关此主题的问题。所有的答案都说不可能,所有的问题都只能像这样回答。

这是一个Programmatically create a photo album in Windows Phone 8

但是在安装了最新的WhatsApp更新后,它正在我的手机相册中创建一个文件夹。搜索互联网后,我得到了以下URL:http://thegeekybeng.com/2013/12/18/whatsapp-for-windows-phone-get-a-much-needed-update/

.. What's more! Now it's easier to search for the videos and photos you Saved from whatsapp as a new folder simply named “Whatsapp” will be Created in the photo album for you to store all the videos and photos Saved from Whatsapp!...



这怎么可能?

最佳答案

“这怎么可能。”仅当您有权访问不公开的API/其他方式时,才有可能,例如,查看诺基亚的this新闻报道,其中指出

The developers were working with Nokia to produce a version that is properly optimised for the latest Windows Phone platform experience.



这意味着WhatsApp开发人员可以访问一些我们“不值得”开发人员无法访问的内部功能。

这是我能想到的唯一解释。那么,有可能吗?是的,但仅适用于精英人士。

编辑:

在WP8.1中,您可以执行以下操作:
IReadOnlyList<StorageFolder> storageFolderList = await KnownFolders.PicturesLibrary.GetFoldersAsync();
if (storageFolderList.Where(x => x.Name == "FolderName").Count() == 0)
{
    StorageFolder folderCreationResult = await KnownFolders.PicturesLibrary.CreateFolderAsync("FolderName", CreationCollisionOption.ReplaceExisting);
    var messageDialog = new MessageDialog("FolderName has been created", "Folder Created");
    await messageDialog.ShowAsync();
}
else
{
    var messageDialog = new MessageDialog("FolderName already exists.", "Folder Exists");
    await messageDialog.ShowAsync(); 
}

关于windows-phone-8 - 如何以编程方式在Windows Phone 8中创建相册文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20696400/

相关文章:

css - Bootstrap 3 下拉菜单不允许在 Windows Phone 8 上滚动

c# - 取消 token 的使用

c# - Windows Phone - 使用互斥锁进行独立存储

javascript - 谁了解 Windows Phone 上的设备方向?

css - 自动溢出的容器中没有滚动条出现(IE10、Windows Phone 8)

c# - 将数据绑定(bind)到 Windows Phone 中的可观察集合

html - 在 Windows Phone 8 的 cordova 应用程序中禁用用户缩放

c# - Windows Phone 8 上的 HttpWebRequest 同步

windows-8 - Windows Phone 8 - 设备管理

c# - 解决方案中不存在 Package.appxmanifest