protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            // make it available in the gallery
            Intent mediaScanIntent = new Intent(Intent.ActionMediaScannerScanFile);

            Android.Net.Uri contentUri = Android.Net.Uri.FromFile(file);
            mediaScanIntent.SetData(contentUri);
            this.SendBroadcast(mediaScanIntent);

            // display in ImageView. We will resize the bitmap to fit the display
            // Loading the full sized image will consume to much memory
            // and cause the application to crash.
            int height = Resources.DisplayMetrics.HeightPixels;

            bitmap = UpdateEntity.LoadAndResizeBitmap(file.Path, width, height);
        }
        public static void saveUpdate(UpdateEntity entity, Stream bytes, KinveyDelegate <UpdateEntity> delegates)
        {
            AsyncAppData <UpdateEntity> appData = getClient().AppData <UpdateEntity> (update_collection, typeof(UpdateEntity));

            FileMetaData fm = new FileMetaData();

            fm.acl = new AccessControlList();
            fm.acl.globallyReadable = true;
            fm._public = true;

            getClient().File().upload(fm, bytes, new KinveyDelegate <FileMetaData> {
                onSuccess = (meta) => {
                    entity.attachement = new KinveyFile(meta.id);
                    appData.Save(entity, delegates);
                },
                onError = (error) => {
                }
            });
        }
 public override void OnCreate(Bundle saved)
 {
     base.OnCreate(saved);
     entity = new UpdateEntity();
 }