Pick and Capture Images & Videos with Xamarin Essentials MediaPicker

Поділитися
Вставка
  • Опубліковано 20 гру 2024

КОМЕНТАРІ • 296

  • @jfversluis
    @jfversluis  4 роки тому +4

    What is the next Essentials API I should do a video about?

    • @rajeshjha3681
      @rajeshjha3681 4 роки тому +1

      geolocation for tracking position on a map.

    • @jfversluis
      @jfversluis  4 роки тому +3

      Rajesh Jha will do!

    • @syanidester
      @syanidester 4 роки тому +1

      recording videos from forms in a custom view would be awesome :) ie. record 15 seconds of video

    • @jfversluis
      @jfversluis  4 роки тому +3

      @@syanidester We've added CameraView to the Xamarin Community Toolkit which can record videos and save that, would that be interesting?

    • @syanidester
      @syanidester 4 роки тому

      @@jfversluis that sounds awesome gerald

  • @LordlyRecords
    @LordlyRecords 3 роки тому +6

    Exactly what I was looking for. Thank you

  • @vigo1301
    @vigo1301 Рік тому +1

    Is it possible to add a frame in the camera, to adjust the image for example a card and automatically trigger the photo?
    Thank you very much

  • @Xxxxxxx721
    @Xxxxxxx721 3 роки тому +2

    Hi Gerald. I implemented this method to my application. However, how to save it on the local database? Should I convert photo into the bytes and arrays? And how to do it. I am stuck there at the moment. And I can not find any clear explanation regarding the matter

    • @jfversluis
      @jfversluis  2 роки тому

      Sorry for the late response Patrick, I hope you got it figured out by now. Saving an image to a database is something you typically don't want to do. You would want to save the image to the filesystem or somewhere online and then save the path to the image in the database. Hope that helps!

  • @juanhamman120
    @juanhamman120 3 роки тому +1

    Hi Gerald, CapturePhotoAsync is not supported on iOS simulators. It will only run on a physical device? I've tried your repo as well. Is there any way around this?

    • @jfversluis
      @jfversluis  3 роки тому +2

      Unfortunately not. The iOS simulator has no way of emulating a camera

  • @Travel_Foodwaves
    @Travel_Foodwaves Рік тому

    Hello.Thanks for this video but i was wondering if we can use this to capture multiple photos in and then select ok and send those pictures to api?

  • @שרוןד-פ4ח
    @שרוןד-פ4ח 3 роки тому +2

    Hi @Gerald, thank you for this great video.
    I was wondering if I can find some more content about how to use the camera record videos and to broadcast live (like in a video chat). Do you have any content about the video part?
    thank you!.

    • @jfversluis
      @jfversluis  3 роки тому

      I think you sent me an email, let's talk a little there!

  • @abottoni83
    @abottoni83 Рік тому

    Hi Gerald. Really nice video explaining how to use the MediaPicker in a simple way. I have a question tho, how can we control the lifecycle events (like on suspend or on resume) when you actually suspend the app while being on the camera or in the media picker itself (Not in the app which is in the background while the camera / picker are on)

  • @ajuice123456789
    @ajuice123456789 3 роки тому

    thank you Gerald Versluis
    Your teaching gave me great help in learning XAMARIN
    I have a question
    When I was practicing this MediaPicker
    I use the photos I selected to save into ImageSoure in a Model
    when I change the page and try to see the ModelDetailPage
    the APP STOP
    (System.ObjectDisposedException:'Cannot access a disposed object.
    Object name:'Stream has been closed'.')
    I try many ways but still can't find the solution
    is it because the Stream not working finish and I change the page
    to make Stream close??
    ([System] A resource failed to call close.
    **System.ObjectDisposedException:** 'Cannot access a disposed object.
    Object name: 'Stream has been closed'.')
    but I try this idea to fix but I no have the solution
    if you know how to do please give me the idea,
    thank you so much

    • @jfversluis
      @jfversluis  3 роки тому +1

      It's kind of hard to know without the code :)
      But this seems like you're accessing the stream already and when you do you have to reset the position. Or maybe you are inside a using statement? Outside of it the stream will be exposed. Dive deeper in how streams work exactly that might be helpful!
      You can also join my Discord server where there are like-minded people helping each other out and chatting

  • @jacobcrosby101
    @jacobcrosby101 4 роки тому +2

    Can you do a video on creating a Xamarin.forms video recorder with custom controls. I noticed that the Xamarin samples from Microsoft are outdated.

    • @jfversluis
      @jfversluis  4 роки тому

      Which samples are that? Did you see the CameraView in the Xamarin Community Toolkit? I am definitely planning videos on controls in there :)

  • @lukasmatousek9326
    @lukasmatousek9326 4 роки тому +1

    Hi, i am using mediapicker to save path to picture on android to database and then load it to variable and when i write that variable to image source it shows nothing. But when i copy that url from database and write that path directly in source and not to variable it works. Can you please help me?

    • @jfversluis
      @jfversluis  4 роки тому

      I’m not sure what you mean, sorry. If you could provide a little sample project or something on GitHub that would be helpful and I could take a look :)

  • @jjscally
    @jjscally 2 роки тому

    Hi Gerald, great video many thanks. In my app I want to start a Media Picker photo or video using a timer so the user doesn't need to press the button. I don't want the user to have to go to the phone camera settings to setup a timer but instead control everything from my app. Is this possible?

  • @lehoangthai8341
    @lehoangthai8341 3 роки тому +1

    Hello, thank for this video. Can i replace image with imageview ?
    If so, how should I replace it ?

    • @jfversluis
      @jfversluis  3 роки тому

      What is ImageView? Is that from another library?

    • @lehoangthai8341
      @lehoangthai8341 3 роки тому

      @@jfversluis Im using Xamarin Android

    • @jfversluis
      @jfversluis  3 роки тому

      Ah! Sure, you should be able to. Not sure how though. You’d have to get the native image object from the stream I guess :)

    • @lehoangthai8341
      @lehoangthai8341 3 роки тому

      okay,
      Thanks

  • @sipepguru
    @sipepguru 4 роки тому +1

    Hi, I beleive this API is based on 🐒 James Montemagno media plugin, can we still access compression quality?
    var caramaFile = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions
    {
    Directory = "Photo",
    SaveToAlbum = true,
    CompressionQuality = 75,
    CustomPhotoSize = 50,
    PhotoSize = PhotoSize.MaxWidthHeight,
    MaxWidthHeight = 2000,
    DefaultCamera = CameraDevice.Rear
    });

    • @jfversluis
      @jfversluis  4 роки тому +1

      It is definitely based on that but they didn’t implement all the options of the MediaPlugin yet. So if you need that, keep using the media plugin for now

    • @sipepguru
      @sipepguru 4 роки тому

      @@jfversluis I see the word "yet" in your reply, so there is potential to add this?

    • @jfversluis
      @jfversluis  4 роки тому +1

      I’ve asked about this and they said they just added the basics but the rest will be added in the future. They didn’t say when though :)

  • @TamirAlalouf
    @TamirAlalouf Рік тому

    Is it possible to have one button that will open an 'open with..' window [which looks like the ShareScreen] and populate all the available apps there [camera, gallery, file system. etc...]?

  • @LosWochos76
    @LosWochos76 3 роки тому

    Again a great video! One question: with the media plugin from James Montemagno one can also resize/compress/crop the images. Unfortunately, he stoped support in december 2020. What would be the best way to this related with the mediapicker of Xamarin.Essentials?

    • @jfversluis
      @jfversluis  2 роки тому

      Thanks so much! Yeah that's unfortunately that that wasn't ported. I'm hoping to get it into .NET MAUI Essentials asap but it might take a while. We're considering making it part of the .NET MAUI Community Toolkit first

    • @danieldahl4585
      @danieldahl4585 2 роки тому

      Any news on this?

  • @richardalain2988
    @richardalain2988 3 роки тому +1

    Hi Gerald, can you tell me how to get a thumbnail from a video capture? Thanks!

    • @jfversluis
      @jfversluis  3 роки тому

      Excellent question! I don't know to be honest. I would expect the platforms to have something for this. Maybe open an issue on the Essentials repo if there isn't one already so they can provide an API for it

  • @alenmathew284
    @alenmathew284 Рік тому +1

    If the target android version is 13 then these read/write storage permission is not working, any solution?

    • @jfversluis
      @jfversluis  Рік тому

      That should be fixed with the latest Xamarin.Essentials release.

    • @alenmathew284
      @alenmathew284 Рік тому +1

      @@jfversluis Xamarin.Essentials is updated to v1.7.5, but still when request for storage permission it is denied , only the camera permission is asked. it is ok when target android verison is 12

  • @pramodpatil4148
    @pramodpatil4148 4 роки тому +1

    Hi Gerald, I'm trying to pick one image at a time and display all picked images in a list. Can you please help me how can I achieve this?

    • @jfversluis
      @jfversluis  4 роки тому

      Great that you're putting this to use! You should be able to just pick the image and either copy that to your app sandbox and show it directly? This is not much information to go on unfortunately. I'm sure you can figure it out!

  • @darachanc4641
    @darachanc4641 2 роки тому

    Could you please show guideline how to get loaded image insert into SQL Server Database?

    • @jfversluis
      @jfversluis  2 роки тому

      Typically databases aren’t meant for images. Save the image to disk or a storage service and save the file path or url to the database

  • @sipepguru
    @sipepguru 4 роки тому +1

    Hi Gerald, thanks for the videos, does MediaPickerOptions support multi picking images?

    • @jfversluis
      @jfversluis  4 роки тому

      I don't think it does at this time. If you need that, you can use the FilePicker: ua-cam.com/video/4gV9ZV61rn4/v-deo.html

    • @muhammedhedyia7258
      @muhammedhedyia7258 4 роки тому

      @@jfversluis how to redirect the path to photo gallerias ?

    • @jfversluis
      @jfversluis  4 роки тому

      @@muhammedhedyia7258 I'm not sure what you mean. You want to save the image to the gallery?

    • @muhammedhedyia7258
      @muhammedhedyia7258 4 роки тому

      @@jfversluis thanks for your response nope , I mean I want to pick images from phone's gallery, I used this FilePicker instead of ImagePicker for multiselect option

    • @jfversluis
      @jfversluis  4 роки тому +1

      If you’re using the filepicker it’s not possible to bring up the gallery. So I guess you’ll have to wait for Essentials to support it or roll your own solution. Sorry :(

  • @miskoralgol575
    @miskoralgol575 2 роки тому

    Hi Gerald, how is with image rotation bug in this component? It seems to not be fixed and Old Xam.Media.Plugin has another bug. I don't find any solution for whole year.

    • @jfversluis
      @jfversluis  2 роки тому

      It is considered a not implemented feature not a bug 😉 but I have it on my radar and want to fix it asap for .NET MAUI

  • @MegaDegraaf
    @MegaDegraaf 4 роки тому +1

    Hi Gerard, I use the MediaPicker.CapturePhotoAsync on a Mac, which should be supported according the documentation (using the essentials 1.6 RC-1). But it instantly returns a FeatureNotSupportedException. What am I doing wrong?

    • @jfversluis
      @jfversluis  4 роки тому

      Did you also install the plug-in on your macOS project?

    • @MegaDegraaf
      @MegaDegraaf 4 роки тому

      @@jfversluis Of course. For example, the media picker works like a charm (PickPhotoAsync).

    • @jfversluis
      @jfversluis  4 роки тому

      @@MegaDegraaf Could you show me the Docs where it says that? Looking at the code that is not something that is supported: github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/MediaPicker/MediaPicker.macos.cs#L10

    • @MegaDegraaf
      @MegaDegraaf 4 роки тому

      @@jfversluis docs.microsoft.com/en-us/xamarin/essentials/platform-feature-support - At media pickerthere is a green button (full support) with macOS.

    • @jfversluis
      @jfversluis  4 роки тому

      @@MegaDegraaf Opened a PR to fix that: github.com/MicrosoftDocs/xamarin-docs/pull/3190
      So, either the Docs will be updated and sorry for the confusion, or I will be proven wrong :D

  • @EmilNeander
    @EmilNeander 4 роки тому +1

    First of all, thanks for your videos, I have learnt a lot! I'm wondering if it's possible to have an image as "filter/overlay" over the camera view? I guess MediaPicker ain't the way to go if that's what I want to do.. Do you have any suggestion for fulfilling my wish?

    • @jfversluis
      @jfversluis  4 роки тому +1

      Sure! CameraView is just another element so just add it to a grid with a row span of 3 for instance and put something in row 1 and 3 and you have an overlay :)

    • @jfversluis
      @jfversluis  4 роки тому +1

      And thank you for the kind words!

    • @EmilNeander
      @EmilNeander 4 роки тому +1

      Thanks for quick resonse! I got it! But are you reffering to CameraView as in Xamarin community toolkit?

    • @jfversluis
      @jfversluis  4 роки тому

      Ah my mistake! Yeah I was :) you said CameraView and now automatically I think about the Toolkit 😅 no this is not possible with MediaPicker not right now anyway

    • @EmilNeander
      @EmilNeander 4 роки тому +1

      @@jfversluis haha my bad, some words just should not be put together ;) Okay thank you, I will look into the toolkit, saw you had a stream about it! :)

  • @abdelrahmanalasal6801
    @abdelrahmanalasal6801 2 роки тому

    Underrated channel bro

    • @jfversluis
      @jfversluis  2 роки тому

      Appreciate that! Spread the word ;)

  • @davispalla
    @davispalla Рік тому

    Hello, thanks for sharing knowledge about xamarin.
    I have a problem with my solution, can you help me?
    I'm testing it on a Samsung XT205 device (A8 tablet), when I open the camera or select the file, my application closes without throwing an error message. Any idea what it could be? From Brazil, thank you very much!

    • @jfversluis
      @jfversluis  Рік тому

      Thank you! Without any error it’s near impossible to do anything. Closely inspect your application output logs Android tends to put a lot of good information in there. Good luck!

  • @noobsatnoon7043
    @noobsatnoon7043 Рік тому

    Hey I have a question, i get an error when i press the take picture button. It says Xamarin.Essentials.PermissionException: 'StorageRead permission was not granted: Denied'. Do you know how to fix this?

    • @jfversluis
      @jfversluis  Рік тому

      If you’re targeting api 33 you probably want to update to version 1.7.5 that just came out and it might fix it.
      Otherwise, make sure you have the permissions set up correctly

  • @jean-baptistedioli1692
    @jean-baptistedioli1692 3 роки тому

    It will be nice to have a video to show how to pick the image to save it in a rest server and how to get the metadata from it. :)

    • @jfversluis
      @jfversluis  3 роки тому +1

      THis is probably useful: ua-cam.com/video/KPDGtLeNClQ/v-deo.html
      And thank you for being a member! Much appreciated!

  • @SportShorts123
    @SportShorts123 3 роки тому

    I have a question how do i make the camera so that it is only on half the page? so that i can have other stuff under it? thanks

    • @jfversluis
      @jfversluis  3 роки тому

      With this you can’t. You then want to look at the CameraView in the Xamarin Community Toolkit

  • @thielenmeister
    @thielenmeister 4 роки тому +1

    I am trying to implement CapturePhotoAsync but after a picture is taken and accepted, xamarin essentials throws a nullreferenceexception and I have no clue how to fix this. Do you have any suggestion?

    • @jfversluis
      @jfversluis  4 роки тому

      O really?! O no! With the exact code as in the demo app?

    • @thielenmeister
      @thielenmeister 4 роки тому +1

      @@jfversluis Yeah, but I think it's a Xamarin.Essentials problem. So I posted it as a bug there

    • @jfversluis
      @jfversluis  4 роки тому

      @@thielenmeister Do you have a link?

    • @mischamehrlich159
      @mischamehrlich159 4 роки тому

      I have the same problem :/

    • @jfversluis
      @jfversluis  4 роки тому

      @@mischamehrlich159 sorry to hear that. If you can provide me with a sample project that reproduces this behavior I can take a look

  • @cissemy
    @cissemy 3 роки тому

    Hi Gerarld
    How to reduce the photo size.
    There used to be something like :
    PhotoSize = PhotoSize.Medium
    Thanks

    • @jfversluis
      @jfversluis  3 роки тому

      That’s not been included here yet :( if you need that keep using the Media Plug-in for now

  • @StQuTheStarQuest
    @StQuTheStarQuest 2 роки тому

    Why is it saving the picture in rotated byy 90 degrees to the left when I capture a picture?

    • @jfversluis
      @jfversluis  2 роки тому

      That’s how the photo is taken originally. Unfortunately, we can’t do anything about it right now. You probably want to use MediaPlugin or MediaGallery right now

    • @StQuTheStarQuest
      @StQuTheStarQuest 2 роки тому

      @@jfversluis Ok well what I do I send my pic to an API and that API has a function to autorotate it that helped me. Weird that xamarin makes it so complex to even rotate a picture :D

    • @jfversluis
      @jfversluis  2 роки тому

      Nothing complex about it. The image control has a rotate property you van use :)

  • @issam608
    @issam608 3 роки тому

    Thank you that very helpful other way how can save the image on the device ? I used CopyToAsync but it's not working

    • @jfversluis
      @jfversluis  3 роки тому

      What does "not working" mean? Are you getting an error?

    • @issam608
      @issam608 3 роки тому

      @@jfversluis Actually my images are not added to the gallery App on the phone

  • @robertocruz231
    @robertocruz231 3 роки тому

    Hi, Do you know if there is any way to optimize the sending of the image? When sending the image to the api it takes a long time

    • @jfversluis
      @jfversluis  3 роки тому

      The old plugin this is based on had something like that. If you need that now you probably want to use that one.

  • @Azazelsk84fun
    @Azazelsk84fun Рік тому

    Nice job as usual, i was wandering if you could do the same example for MAUI, because I have some trouble with and I gave up to take a photo on MAUI. If you could help it would save me. Thanks!

  • @LuisGustavoJulio
    @LuisGustavoJulio 3 роки тому

    Hi Gerald,
    Hi Gerald
    if I want to use Binding and not x:name how should I use it?
    when using x:name is not displayed in the viewModel :(
    resultImage.Source

    • @jfversluis
      @jfversluis  3 роки тому

      Create a property of type ImageSource and assign the image to that. Then make a binding to that property from your view :)

    • @LuisGustavoJulio
      @LuisGustavoJulio 3 роки тому +1

      @@jfversluis Thank you bro, I'll give it a try 🙏🙏🙏🙏🙏🙏👌

  • @ksahithreddy
    @ksahithreddy 4 роки тому +1

    Is it possible to add watermark to the image ?
    If yes, could you please provide enough details for android and iOS please ?
    Thank you so much

    • @jfversluis
      @jfversluis  4 роки тому

      You might be able to do that with SkiaSharp. I will see what I can do :)

    • @ksahithreddy
      @ksahithreddy 4 роки тому

      Gerald Versluis thank you and we want to add the watermark while saving image (after taking Live Photo from Xamarin app ) to gallery in android and iOS.

  • @pjh5757
    @pjh5757 3 роки тому

    I have been trying to use this to get the selected image into an Essentials email as attachment but so far no luck. Where would I find examples of this being done?

    • @jfversluis
      @jfversluis  3 роки тому

      Why is it not working? Looking at the code it should be straight-forward since the MediaPicker and the Email APIs use the same object for the file

    • @pjh5757
      @pjh5757 3 роки тому +1

      @@jfversluis I got it working with FilePicker.PickMultipleAsync after some messing around and finding out i cant seem to step through an array in C# like i can in powershell but maybe as things move forward i will circle back around to MediaPicker

    • @jfversluis
      @jfversluis  3 роки тому

      Weird, but glad you found a way!

  • @yaKaiZen
    @yaKaiZen 2 роки тому

    This is great, Gerald!
    Can I implement all or most common Xamarin tools, plugins, or NuGet packages similarly?
    You know, I'm a curious novice with loads of naive questions!

    • @jfversluis
      @jfversluis  2 роки тому

      I’m not sure what you mean, sorry!

  • @carlospardo5132
    @carlospardo5132 4 роки тому +1

    Thank you for the video. Was very useful but, I can't install the versión 1.6, in the nuget packages appear only the version 1.5.X. I have Microsoft Visual Studio Professional 2019 Version 16.7.4. Any clue? Thank you.

    • @jfversluis
      @jfversluis  4 роки тому

      Hey Carlos! Absolutely, at this time 1.6 is in pre-release. In the screen to install nuget packages check the “show pre-releases” box and it should show up :)
      Thanks for watching!

    • @carlospardo5132
      @carlospardo5132 4 роки тому +1

      Great! I Got it. Thank you.

  • @vonbelow45
    @vonbelow45 4 роки тому

    Hello Gerald ...
    I really liked your video, well explained and with great didactics ...
    It is possible for me to open the camera and take a photo without pressing the camera button ... in automatic mode ... after I pressed the button in my application it already opens the camera, takes the photo and returns the image without pressing any button ?

    • @jfversluis
      @jfversluis  4 роки тому

      Thank you Alexander! Much appreciated!
      That is not possible with the MediaPicker, however! There is the Xamarin Community Toolkit (github.com/xamarin/XamarinCommunityToolkit/ in preview right now) which has the CameraView which should be able to do that

    • @vonbelow45
      @vonbelow45 4 роки тому +1

      @@jfversluis Thank you ... I'll see this link ...

    • @jfversluis
      @jfversluis  4 роки тому +1

      @@vonbelow45 Let me know if you need anything!

  • @a.anshal
    @a.anshal 2 роки тому

    Will this also work on .net MAUI?
    If not please can you guide me for the same

    • @jfversluis
      @jfversluis  2 роки тому

      This should work exactly the same for .NET MAUI

  • @irfanhasan07
    @irfanhasan07 2 роки тому

    Thanks for your helpful content, but how can I crop an image while capturing?

    • @jfversluis
      @jfversluis  2 роки тому

      Not possible right now. You’ll have to do that afterwards

    • @irfanhasan07
      @irfanhasan07 2 роки тому

      @@jfversluis Thanks for your reply, can you please make another content on this (crop image)?

  • @avinashsingh4520
    @avinashsingh4520 3 роки тому

    While camera opened we loose app context, i mean onresume is not working if i minimize the app and and reopen it. Can we do something to get onresume when camera is open?

    • @jfversluis
      @jfversluis  3 роки тому

      Hm I didn't notice this yet... Maybe see if there's an issue for that on the repository and if not open one :)

  • @robertroszak4955
    @robertroszak4955 4 роки тому +1

    Thanks for very informative content. Nice to see new xamarin-focused channel, there still too few of them (especially of such a good quality). I'm currently implementing media picker in my project so your video couldn't have been published in better time 🙂 Perhaps you know how to pick both video and photo at once? I see only separate methods and imo having 2 buttons (1 to pick photo, 2 to pick video) on small screen is rather peculiar 🙂

    • @jfversluis
      @jfversluis  4 роки тому

      Thank you for the kind words Robert! Appreciate it!
      There is no way of picking both at the same time. At least not with the current version. So I guess you’d have to find a different solution. Maybe have 1 button “pick file” or “pick image/video” and then first show a pop-up that lets people choose between one or the other. Not ideal, but better than nothing I guess! And I happen to know that Essentials gladly accepts pull requests ;)

  • @simboi
    @simboi 3 роки тому

    some of the photos that I pick from the gallery get rotated 90 degrees.. any fix for this bug?

    • @jfversluis
      @jfversluis  3 роки тому

      That’s probably because the picture was taken that way. The MediaPlugin had a method to automatically rotate, that didn’t make it into Essentials (yet). Maybe there is the rotation angle property that you can use to show it correctly?

    • @rconn5641
      @rconn5641 3 роки тому

      @@jfversluis Hi Gerald - thanks for the great videos. I am using Essentials 1.7.0. Photo Capture for iOS rotates all images 90 degrees automatically. I've seen that others have also experienced this. Any rumors on when this might be addressed? All the workarounds to rotate back cause a lot of overhead. Thanks!

  • @lukasmatousek9326
    @lukasmatousek9326 4 роки тому

    Hi, i am stucked MediaPicker line because visual studio compiler writes me that MediaPicker doesnt exists.

    • @jfversluis
      @jfversluis  4 роки тому +1

      Did you install the 1.6 pre-release version of Xamarin.Essentials? ;)

    • @lukasmatousek9326
      @lukasmatousek9326 4 роки тому +1

      @@jfversluis no, thanks :)

  • @niharikasaraswat2181
    @niharikasaraswat2181 3 роки тому

    Thanku so much your videos are really helpful and informative.I want to design a circular image which is editable just like profile picture pick from gallery and capture from camera so can u provide any idea on it??

    • @jfversluis
      @jfversluis  2 роки тому

      Thank you! I don't believe there is a library out there. Maybe Telerik or Syncfusion or some third-party like that has something for it? Did you find something yet?

  • @joesboymans8911
    @joesboymans8911 2 роки тому

    How do I open the androidmanifest GUI editor? It does not open for me.

    • @jfversluis
      @jfversluis  2 роки тому

      I'm not sure if it's supposed to work right now, at least for .NET MAUI. Right-click the file and select Open With. See if there is a GUI option in there.

    • @joesboymans8911
      @joesboymans8911 2 роки тому

      @@jfversluis Couldn't find it. But it doesn't really matter, it works anyway. haha

  • @4Asteria
    @4Asteria 4 роки тому +1

    Thank you for your explanation. Really helpful

    • @jfversluis
      @jfversluis  4 роки тому +1

      Glad it was helpful! Let me know if you need anything else :)

  • @daredevilpantera
    @daredevilpantera 4 роки тому

    Hi Gerald, you did it again fantastic video.
    I have been playing with the Media player, what I found out is when is running on a physical device on IOS when a picture is taken it actually reverse the image and when you put the phone on landscape mode it actually put the image upside down, any idea what can be the solution? I will investigate and see if I find a solution for it.
    It's seems only to be be working properly on landscape mode clockwise, interesting.

    • @jfversluis
      @jfversluis  4 роки тому +1

      Thanks David! You mean MediaPicker I assume?
      Yeah interestingly enough there was a method in the MediaPlugin for this... something like GetAndRotateImage or something. You could try and use the MediaPlugin which is the exact same thing but the MediaPicker is still missing a few pieces, they’re working on porting that :)

    • @daredevilpantera
      @daredevilpantera 4 роки тому +1

      ​@@jfversluis Thanks for the reply I will use the MediaPlugin then.

    • @jfversluis
      @jfversluis  4 роки тому +1

      Let me know if that solves it. Else I can have a look :)

    • @daredevilpantera
      @daredevilpantera 4 роки тому

      @@jfversluis Sorted, it works like a charm with MediaPlugin, thanks for all the support your a star.

    • @jfversluis
      @jfversluis  4 роки тому

      @@daredevilpantera alright! Great! Then just use that until they moved everything over. Or, of course, if you’re brave enough contribute that yourself 😉

  • @meloimagpantay7904
    @meloimagpantay7904 4 роки тому

    I think all of your videos are great. I just want to ask if you know some sources where I could study C#, Xamarin, and all that I need to build a mobile app. In my mobile app, I need a server that handles push notification and receives image from the user (as much as possible, I want the server to automatically push notifications to specific users). Can you recommend me some books or any sources where I could learn more about developing a mobile app with that kind of features? I really don't know where to start and where should I learn those. I want to be like you who knows a lot more about developing a mobile app.

    • @meloimagpantay7904
      @meloimagpantay7904 4 роки тому +1

      I really want to join your channel. But first, I want to be confident on my knowledge and skills by studying by myself before I could interact with you. The problem is I don't know what should I study to have a concrete knowledge about developing a mobile app using Xamarin. There are lots of things I want to learn so that I could easily communicate to you my questions and ideas.

    • @jfversluis
      @jfversluis  4 роки тому

      Great Meloi! And I'm glad you found my channel. I hope the content will serve you well. In terms of learning Xamarin, it depends. I feel like that you learn most by doing. There is the official channel ua-cam.com/users/xamarindevelopers that has a lot of great content, also for beginners, check out the Xamarin 101 series. Then the Docs, I think are pretty amazing as well. I think there is also an e-book on there docs.microsoft.com/en-us/xamarin/
      For blog posts you can have a look at planetxamarin.com which aggregates a lot of blogs from the community and from there just click through to their pages and other resources mentioned in there. And I think finally, have a look at all the GitHub repos people are putting out there to see what people are creating.
      Hope this helps!

    • @meloimagpantay7904
      @meloimagpantay7904 3 роки тому

      @@jfversluis Wow, this is great. Thanks!

  • @lfeldmantutoring
    @lfeldmantutoring 3 роки тому

    Outstanding video! When I try to upload a video from the album on iOS, microphone permissions are prompted. I read that it's a bug. Any idea when Xamarin Essentials will be updated? Thanks!

    • @jfversluis
      @jfversluis  3 роки тому

      Thank you Larry! Appreciate it! To be honest I don't know. It's been a while since a version was released, I feel they are focussed on .NET MAUI/.NET 6 at this time

    • @lfeldmantutoring
      @lfeldmantutoring 3 роки тому

      @@jfversluis Are you related to Jay?

    • @jfversluis
      @jfversluis  3 роки тому

      Not that I know of 😅

    • @lfeldmantutoring
      @lfeldmantutoring 3 роки тому

      @@jfversluis Someone named Jay Versluis used to help with iOS development. Anyway, I subscribed as a Senior Developer to your channel.

    • @jfversluis
      @jfversluis  3 роки тому

      @@lfeldmantutoring Oooh is that right? That is so funny! There is actual 2 other Gerald Versluis's in the Netherlands who both also work in IT 😅
      Wow Larry! That is so nice of you! Thank you for supporting me! Make sure to join the Discord if that's something you like :) discord.gg/ksPeY286

  • @snjosyula
    @snjosyula 3 роки тому

    I have an issue here. It default shows the same image from which the photo captured. But its not showing from the URL i supplied to. Captured in one phone is not showing in another phone. URI coming from server and supplied to image source but it shows one the one which captured from that phone it self. Is something related to cache?

    • @jfversluis
      @jfversluis  3 роки тому

      I'm not sure if I follow what you're trying to do here, sorry :)

    • @snjosyula
      @snjosyula 3 роки тому

      @@jfversluis
      I ran the app two devices:
      1. iphone i took a capture and stored in the server.
      2. in android if i open the screen image is blank, but I am pulling URI from the server. If i take a capture in this device it shows the capture of this phone.
      3. If I open iphone again it shows ony iphone captred image not the one from android
      4. If i open the andorid again it shows only the android captured image not the one from iphone
      I am pretty sure the image is stored in server and woring.

    • @snjosyula
      @snjosyula 3 роки тому

      I cleared both the phone caches and uninstalled and working fine now. But don't know how it will react when I go live

    • @jfversluis
      @jfversluis  3 роки тому

      @@snjosyula I guess testing software is important after all! It's hard to say where it goes wrong with all these moving parts :)

  • @kevinhermawan7524
    @kevinhermawan7524 4 роки тому +1

    sir can u make videos about how to capture image using native camera preview, hope to see ur next videos

    • @jfversluis
      @jfversluis  4 роки тому

      Just change PichPhotoAsync to CapturePhotoAsync and you can capture an image! :)

  • @saieshwar7816
    @saieshwar7816 Рік тому

    I'm getting error at the picphotoasync

    • @jfversluis
      @jfversluis  Рік тому

      Without any details it will be impossible to say something useful 😅

    • @saieshwar7816
      @saieshwar7816 Рік тому

      @@jfversluis intelligence is not working at the Mediapicker , it is not showing pickphotoasync, Even if write it manually it showing me an error

  • @edwinsaibel2278
    @edwinsaibel2278 2 роки тому

    Great Video! Do you happen to know how to convert the StreamImageSource into a string, so I can save the source in a database (in an model/entity)?
    Or is there a more elegant way to solve this?
    Sorry for trying to "outsource" this info, I haven't come up with any solution for this usecase yet...
    I really appreciate your help and the value you create with tutorials like these! Keep it up :)

    • @jfversluis
      @jfversluis  2 роки тому

      Thanks for the kind words! Personally I think saving images to a database is a bad idea. You want to save the image on disk and then save the path to it in the database. If you really want to do it, I guess you'll have to convert it to a Base64 string

    • @edwinsaibel2278
      @edwinsaibel2278 2 роки тому

      @@jfversluis Wow that was a quick reply!
      Yes, that's exactly what I was planning all along. I just had trouble finding a way to convert the StreamImageSource to a string.
      I haven't found any suitable methods in the StreamImageSource object to do so. Converting a FileImageSource to string seems much simpler in contrast.
      I'll try some more with Base64 string then.
      Thanks!

  • @dipakatkari2685
    @dipakatkari2685 3 роки тому

    Thank you so much for these most important things

  • @kevinstephenbiswas1477
    @kevinstephenbiswas1477 3 роки тому

    How do I save the Image to my local storage?

    • @jfversluis
      @jfversluis  3 роки тому

      What do you want to do with it?

    • @emanuelevaini5677
      @emanuelevaini5677 3 роки тому

      @@jfversluis , it is also my goal, therefore this is my reply: I need to use the image as a "profile image", so I would like to store it somewhere (and somehow) in order to load and show everytime my Xamarin App is opened...
      But this is the point of view and the strategy that i am thinking about, maybe there are better ones.
      Thanks in advance

  • @stryder12345
    @stryder12345 2 роки тому

    My Mediapicker doesn't save videos, could you give advice? I didn't receive any errors

    • @jfversluis
      @jfversluis  2 роки тому

      Maybe check if you got the right permissions set up?

    • @stryder12345
      @stryder12345 2 роки тому

      @@jfversluis it asks for permissions, it also capture video, and when i press ok, video dissappears from files.

    • @stryder12345
      @stryder12345 2 роки тому

      @@jfversluis my manifest

    • @stryder12345
      @stryder12345 2 роки тому

      My video code
      private async Task AttachVideoMethodAsync()
      {

      var file = await MediaPicker.CaptureVideoAsync();
      if (file == null)
      {
      await alertService.ShowMessage("Error", "Something wrong 0_o");
      }
      else
      {

      UploadedFile = await AttachFile();
      await UploadPhotoToServer(UploadedFile, "file");
      }
      }

    • @stryder12345
      @stryder12345 2 роки тому

      file has way to video , but video doesn't exist

  • @pmcgktr
    @pmcgktr 3 роки тому +1

    Damn this is is a great tutorial, got it working in my app, thank u man god bless 🥺🙏

    • @jfversluis
      @jfversluis  3 роки тому

      Wow thanks PJ! Glad it was helpful!

  • @maskmohan227
    @maskmohan227 3 роки тому

    Permission are denied ,it's goes for camera?

    • @jfversluis
      @jfversluis  3 роки тому

      Probably because you can also capture an image it also needs the camera permission

  • @AMIRKHAN-dm2fm
    @AMIRKHAN-dm2fm 4 роки тому +1

    Thanks but please tell me abou some free reporting services in xamarin.forms and also told me how to generate PDF file from a collection view data .

    • @jfversluis
      @jfversluis  4 роки тому

      I think that is nearly impossible for free since that are very extensive tools. Are you aware that SuncFusion offers community licenses which are free if you’re a small developer? I think they have some controls that might be what you’re looking for :)

    • @AMIRKHAN-dm2fm
      @AMIRKHAN-dm2fm 4 роки тому

      @@jfversluis Thanks for reply. can we make pdf with WebView control in Xamarin, or can you please make a tutorial on it title: Make pdf of html page using WebView in Xamarin.Forms. i have follow different documentations for this purpose but nothing done.

    • @AMIRKHAN-dm2fm
      @AMIRKHAN-dm2fm 4 роки тому +1

      @@jfversluis else please make a series or a single tutorial with Syncfusion controls for reporting. Thank you so much.

    • @jfversluis
      @jfversluis  4 роки тому +1

      AMIR KHAN did you see this one? www.pujolsluis.com/how-to-display-pdf-in-xamarin-forms-with-ease/

    • @jfversluis
      @jfversluis  4 роки тому

      AMIR KHAN I was just thinking about that :)

  • @ferencferenc4913
    @ferencferenc4913 3 роки тому

    Hi,
    The example is very good for image capture and display, but not for video, because it cannot be displayed.
    Can you show me an example?

    • @jfversluis
      @jfversluis  3 роки тому

      Why not for video?

    • @ferencferenc4913
      @ferencferenc4913 3 роки тому

      async void Button1_Clicked(System.Object sender, System.EventArgs e)
      {
      var result = await MediaPicker.CaptureVideoAsync();
      if (result != null)
      {
      var stream = await result.OpenReadAsync();
      resultImage.Source = ImageSource.FromStream(() => stream);
      }
      }
      The Android device does not display it.

    • @ferencferenc4913
      @ferencferenc4913 3 роки тому

      Can you help me?

  • @gouravv54
    @gouravv54 3 роки тому

    Hi, Does it supports allow cropping feature

    • @jfversluis
      @jfversluis  3 роки тому +1

      I don’t think it does

    • @gouravv54
      @gouravv54 3 роки тому +1

      @@jfversluis Thanks for the quick Reply 😊

  • @AbhijithCRX
    @AbhijithCRX 3 роки тому

    Is there an option to pick videos AND photos from gallery using a single dialog?

    • @jfversluis
      @jfversluis  3 роки тому

      I don't think that is possible right now

  • @Dani-kq6qq
    @Dani-kq6qq 3 роки тому

    Thank you very much Gerald, you saved me. I SMASHED that big red beautiful subscribe button. Now I also ran into a little snag, the image I capture is not automatically saved, no errors shown, just doesn't save it, what do you suspect could be the issue?

    • @jfversluis
      @jfversluis  3 роки тому

      Thanks! Appreciate it! There is no issue, I think this doesn’t save it automatically :) so either save it somewhere yourself, or if you want to save it to the gallery you might want to check this one: ua-cam.com/video/8JvgnlHVyrI/v-deo.html

  • @zacharyyarost5804
    @zacharyyarost5804 3 роки тому

    Great video! Thanks dude

    • @jfversluis
      @jfversluis  3 роки тому

      Great! Thanks for letting me know :)

  • @afrrcyn6158
    @afrrcyn6158 3 роки тому

    Hello, Sorry but I keep getting this error when running the code, and I can't seem to find a solution:
    'Method not found: bool Xamarin.Forms.Internals.ResourceLoader.get_IsEnabled()'

    • @jfversluis
      @jfversluis  3 роки тому

      Make sure all your projects have the same versions of the nuget packages installed. This error message usually means that you haven’t :)

    • @afrrcyn6158
      @afrrcyn6158 3 роки тому +1

      @@jfversluis Hello yea, I think the problem was that I needed to ensure I was using Version 10 of Android or something... I don't really know to be honest I just changed the version to 10 and removed the NuGet packages and them re-built the solution and like magic it worked! Thanks for the Video it was Great :D

    • @jfversluis
      @jfversluis  3 роки тому +1

      Thank you! 🙏 glad you figured it out!

  • @JoJo-yu7hh
    @JoJo-yu7hh 3 роки тому

    Great video, but unfortunately the app crashes after selecting the picture ...

    • @jfversluis
      @jfversluis  3 роки тому

      Do you have any error message?

    • @JoJo-yu7hh
      @JoJo-yu7hh 3 роки тому

      @@jfversluis no

    • @jfversluis
      @jfversluis  3 роки тому

      @@JoJo-yu7hh there is probably something in the application output :) without any error message or info it’s hard to say

    • @JoJo-yu7hh
      @JoJo-yu7hh 3 роки тому

      @@jfversluis The console outputs that: Java.IO.IOException: Failed to copy the given amount of bytes from the inputstream to the output stream.

  • @FebiMettasari
    @FebiMettasari 2 роки тому

    Great tutorial!

  • @vamshiKrishna-yx9iq
    @vamshiKrishna-yx9iq 3 роки тому

    Can pickup multiple images?

    • @jfversluis
      @jfversluis  3 роки тому

      I don’t think that’s supported right now, sorry

    • @vamshiKrishna-yx9iq
      @vamshiKrishna-yx9iq 3 роки тому

      @@jfversluis thanks for quick response.😊

  • @markusGone
    @markusGone 3 роки тому

    very cool and perfect explained. thank you very much :)

    • @jfversluis
      @jfversluis  3 роки тому

      Thanks Markus! Appreciate it!

  • @muhammadyaseen1418
    @muhammadyaseen1418 4 роки тому

    Greetings to you !!!
    Your Channel is a best

    • @jfversluis
      @jfversluis  4 роки тому +1

      Thank you Muhammad! Appreciate it!

  • @OCH.Hector
    @OCH.Hector 3 роки тому

    how to take multiphots without loop?

    • @jfversluis
      @jfversluis  3 роки тому

      Can’t do it right now without a loop

  • @TheHPure
    @TheHPure 3 роки тому

    Very helpful video, but i'm having an error.
    whenever I press the button to pick a photo, i get an error.
    System.TypeLoadException: 'Could not load type of field 'IMS.Returns.frmTakePhoto+d__1:5__2' (6) due to: Could not resolve type with token 010000a3 from typeref (expected class 'Xamarin.Essentials.FileResult' in assembly 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') assembly:Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:Xamarin.Essentials.FileResult member:(null)'
    I tried googling it, but I got nothing I understood.
    Thanks!

    • @jfversluis
      @jfversluis  3 роки тому

      This usually happens when the versions on the different projects don’t line up. Please check if you have the same version of Essentials installed on your shared project as well as your platform projects

  • @dotnettohard
    @dotnettohard 3 роки тому

    How to get and delete picture in xamarin forms

    • @jfversluis
      @jfversluis  3 роки тому +1

      Don’t think that’s possible

    • @dotnettohard
      @dotnettohard 3 роки тому

      @@jfversluis Why not possible?, could you help me, i want to get picture list and delete it, how to do it?

    • @jfversluis
      @jfversluis  3 роки тому +1

      @@dotnettohard ah I think I misunderstood. It would be possible, but I don’t know if any library that does that right now so you would have to write platform code for that

    • @dotnettohard
      @dotnettohard 3 роки тому

      @@jfversluis yes, my app would take many picture and only keep last picture for some bussiness. So i want to get and delete another it

  • @rajeshjha3681
    @rajeshjha3681 4 роки тому

    Good to see your videos.

    • @jfversluis
      @jfversluis  4 роки тому +1

      Good to see you’re watching them Rajesh! I hope you like them!

  • @kumarvalli3246
    @kumarvalli3246 3 роки тому

    How to compress the image without saving to Mobile storage?

    • @jfversluis
      @jfversluis  3 роки тому

      Compress without saving it to disk first? Or? Not sure what you mean :)

    • @kumarvalli3246
      @kumarvalli3246 3 роки тому

      @@jfversluis when I capture an image using camera the compression ratio should be 40% . is there any possibility to do this using Xamarin essentials ? This image should not be stored in the users mobile storage.

    • @jfversluis
      @jfversluis  3 роки тому

      I don’t think that’s in there yet. If you need it you probably want to use the media picker plug-in for now

    • @kumarvalli3246
      @kumarvalli3246 3 роки тому +1

      @@jfversluis Thanks for the info, I will check with media picker.

  • @TheNacropolice
    @TheNacropolice 4 роки тому

    I get a null ref exception on my android 10 oneplus 5t after clicking the check icon to confirm the image i took

    • @jfversluis
      @jfversluis  4 роки тому

      Sorry to hear that! :( Looks like this issue is reported here: github.com/xamarin/Essentials/issues/1481
      Make sure to add to that with all the details you can find!

    • @ericleija9287
      @ericleija9287 4 роки тому +1

      @@jfversluis getting the same error... went ahead and added a post to the comments of the bug thread :(

  • @vikaschoudhary4373
    @vikaschoudhary4373 4 роки тому +1

    Thanks for this video Your Videos Is Very Help Full for me Sir this is Working Fine In my Emulator and capture Image nd save local storage But Not Working on my Android real device should be work in my device?

    • @jfversluis
      @jfversluis  4 роки тому

      You are most welcome! Is this with the demo code from the sample? And only on a real device?

    • @vikaschoudhary4373
      @vikaschoudhary4373 4 роки тому

      @@jfversluis so how to work in my android Phone this sample code? plz help

    • @jfversluis
      @jfversluis  4 роки тому

      I want to help you, but then I will need some information and answers to the questions I’m asking :)

    • @vikaschoudhary4373
      @vikaschoudhary4373 4 роки тому

      @@jfversluis sure
      yes plz

    • @jfversluis
      @jfversluis  4 роки тому

      So, are you using the sample app that I use in the video? What device are you testing on?

  • @samsman007
    @samsman007 3 роки тому

    1 sad thing about this Xamarin Essentials MediaPicker is, it does NOT have the most required CROP function!

    • @jfversluis
      @jfversluis  3 роки тому

      It is indeed a work in progress. I wouldn't call it sad... See it as an opportunity to contribute ;)

  • @ababacarcisse7969
    @ababacarcisse7969 2 роки тому

    Ha yes thank you for your good tutorial ❤️❤️

  • @zeetsoft
    @zeetsoft 3 роки тому

    Thank you so much.

    • @jfversluis
      @jfversluis  3 роки тому

      Thanks Ranjit! It's my pleasure, glad it was useful :)

  • @bliitzeg
    @bliitzeg 3 роки тому

    In android debug mode works perfectly but when is in release mode and then Archive to create the apk, give me this error:
    Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'Xamarin.Essentials.FileResult' (defined in assembly , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') with scope 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve Xamarin.Essentials.FileResult
    at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)

    • @jfversluis
      @jfversluis  3 роки тому +1

      Hm looks like something with the linker settings... have a look at the repo issues if maybe someone encountered this

    • @bliitzeg
      @bliitzeg 3 роки тому +1

      @@jfversluis I just resolved deteting the folder bin and obj of xamarin form, android and ios project.

    • @jfversluis
      @jfversluis  3 роки тому +1

      Great! Glad you found the issue. Deleting bin/obj is like rebooting your machine 😂

    • @bliitzeg
      @bliitzeg 3 роки тому

      @@jfversluis 😅🤣

  • @vikaschoudhary4373
    @vikaschoudhary4373 4 роки тому +1

    like this after a picture is taken and accepted, xamarin essentials throws a nullreferenceexception

    • @thielenmeister
      @thielenmeister 4 роки тому

      I had the same problem

    • @jfversluis
      @jfversluis  3 роки тому

      Sorry for the late reply friends... Did you figure it out?

  • @thewhitedragon2283
    @thewhitedragon2283 4 роки тому

    Thank you very much

    • @jfversluis
      @jfversluis  4 роки тому

      Always a pleasure! I hope you find it useful

  • @gwisekor
    @gwisekor 4 роки тому

    github.com/jfversluis/XFEMediaPickerSample
    this sample code error (Take Image).
    "System.NullReferenceException: Object reference not set to an instance of an object."

    • @jfversluis
      @jfversluis  4 роки тому

      On what line exactly? What platform? Did you set the right permissions?

    • @gwisekor
      @gwisekor 4 роки тому

      @@jfversluis samsung galaxy20.
      camera permission ok.
      i guess essential error.

    • @jfversluis
      @jfversluis  4 роки тому

      On what line of code are you getting the error?

  • @hardysd
    @hardysd 2 роки тому

    thank u bro...