Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a photo album folder in Windows Phone 8 Programmatically

I have seen many questions about this topic. All answers are saying it is not possible and all questions are answered like that only.

Here is one Programmatically create a photo album in Windows Phone 8

But after installing the latest WhatsApp update it is creating a folder in my phone photo album. After searching the internet I got this 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!...

How is this possible?

like image 653
Naga Harish M Avatar asked Dec 20 '13 04:12

Naga Harish M


2 Answers

"How is this possible." This is only possible if you have access to API's/other means that are not publicly available, look at this news report from Nokia for example, it states

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

This means that the WhatsApp developers had access to some of the internal goodies that we "unworthy" developers do not.

This is the only explanation I can think of. So, is it possible? Yes, but only for the elite.

EDIT:

In WP8.1 you could do this:

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(); 
}
like image 114
Cloud9999Strife Avatar answered Oct 22 '22 12:10

Cloud9999Strife


This has been now provided to all developers finally through Windows 8.1 update and Visual Studio 2013 Update 2.

KnownFolders.PicturesLibrary.CreateFolderAsync("My Album Name", CreationCollisionOption.ReplaceExisting);
like image 30
Ahmad Pirani Avatar answered Oct 22 '22 13:10

Ahmad Pirani