Sharing Images with Other Devices Using NFC or with Other Registered Phone Services
New to the Windows Phone 8 SDK is the
ShareMediaTask, which allows you to pass an image to another device via NFC, or to another person using the phone’s messaging app, or with another registered service on the phone such as OneNote.
To launch the
ShareMediaTask, create a new instance of the task and set its
FilePath property to the location of a file on the device, as shown:
ShareMediaTask shareMediaTask = new ShareMediaTask();shareMediaTask.FilePath = fileName;shareMediaTask.Show();
ShareMediaTask works well in conjunction with other tasks, in particular the
CameraCaptureTask and the
PhotoChooserTask. This is demonstrated in ...