code: function(eventArgs) {
          if (eventArgs.kind === Windows.ApplicationModel.Activation.ActivationKind.pickFileContinuation) {
              var file = eventArgs.files[0];
              if (!file) {
                  errorCallback("User didn't choose a file.");
                  webUIApp.removeEventListener("activated", filePickerActivationHandler);
                  return;
              }
              if (destinationType == Camera.DestinationType.FILE_URI || destinationType == Camera.DestinationType.NATIVE_URI) {
                  if (targetHeight > 0 && targetWidth > 0) {
                      resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType);
                  }
                  else {
                      var storageFolder = getAppData().localFolder;
                      file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).done(function (storageFile) {
                          if(destinationType == Camera.DestinationType.NATIVE_URI) {
                              successCallback("ms-appdata:///local/" + storageFile.name);
                          }
                          else {
                              successCallback(URL.createObjectURL(storageFile));
                          }
                      }, function () {
                          errorCallback("Can't access localStorage folder.");
                      });
                  }
              }
              else {
                  if (targetHeight > 0 && targetWidth > 0) {
                      resizeImageBase64(successCallback, errorCallback, file, targetWidth, targetHeight);
                  } else {
                      fileIO.readBufferAsync(file).done(function (buffer) {
                          var strBase64 =encodeToBase64String(buffer);
                          successCallback(strBase64);
                      }, errorCallback);
                  }
              }
              webUIApp.removeEventListener("activated", filePickerActivationHandler);
          }
      }
docs: /*
  Need to add and remove an event listener to catch activation state
  Using FileOpenPicker will suspend the app and it's required to catch the PickSingleFileAndContinue
  https://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn631755.aspx