예제 #1
0
        private async Task SetLocation()
        {
            var outfile = new File(GetPicturesDirectory(), $"{System.Guid.NewGuid()}.jpg");
            var uri     = Uri.FromFile(outfile);

            await CreateCopy(imageUri, uri);

            var exif = new ExifInterface(outfile.AbsolutePath);

            exif.WriteLocation(deviceLocation);
            MakeAvailableInGallery(uri);

            FindViewById <TextView>(Resource.Id.imageLocationText).Text = $"{deviceLocation.Latitude}, {deviceLocation.Longitude}";
        }