MediaPlugin | Take & Pick Photos and Video Plugin for Xamarin and Windows | Form library
kandi X-RAY | MediaPlugin Summary
kandi X-RAY | MediaPlugin Summary
Take & Pick Photos and Video Plugin for Xamarin and Windows
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MediaPlugin
MediaPlugin Key Features
MediaPlugin Examples and Code Snippets
Community Discussions
Trending Discussions on MediaPlugin
QUESTION
I am using this nuget package
https://github.com/jamesmontemagno/MediaPlugin
It is available for both ios and android in pcl.
I am using it to make videos in my app.
Unfortunately, it has issues on iOS that are inside the project, not inside my code.
I am therefore trying to debug the project, not just implement the nuget library.
It does work fine on Android, so all I want to change is the iOS part.
Unfortunately, I dont know how to insert the same library when it isnt a nuget package but just the solution and also how to then adress it from pcl code. I havent found a solution on google, but probably I dont know how to describe the problem well enought.
How can I debug an open source nuget package?
Thank you
...ANSWER
Answered 2021-May-28 at 14:12- Download or clone the src code,
- Go to your project in VS,
- Right click on your solution, choose Add -> Existing project,
- Navigate to MediaPlugin-master\src\Media.Plugin and choose Media.Plugin.csproj file,
- Right click on your iOS project (or whatever project where you use the plugin), choose Add -> Reference,
- Check Media.Plugin and click OK,
- Now you should be able to use the plugin in your project code after adding
using Plugin.Media;
(and the code of the plugin will be available to you).
QUESTION
I am using MediaPlugin for opening Camera and Gallery to select pictures. After selecting a picture, I need to crop it before setting it on the UI. I have tried AllowCropping = true
in the camera, but it works only for windows and ios. For the camera in android and gallery on all platforms (android, ios, and windows) there is no crop option.
I tried ImageCropper.Forms package to implement the image cropping feature.
My Code:
...ANSWER
Answered 2021-Jan-20 at 12:21First of all, Add ImageCropper.Forms.Fix.v2 nuget package to your project.
Then, if you use AndroidX
, please change the code in tag of AndroidManifest.xaml
QUESTION
I am using ImageCropper.Forms for cropping the image selected from the camera and gallery.
My Code:
...ANSWER
Answered 2021-Jan-21 at 13:06as shown in the docs, use a Success
handler
QUESTION
So after recently updating dependencies including Xamarin Forms, I can no longer see saved images within our app in iOS. We use https://github.com/jamesmontemagno/MediaPlugin for adding/taking pictures and have even tried specific OS file writes to environment folder:
iOS specific for saving an image:
...ANSWER
Answered 2021-Jan-20 at 06:01Old path:
/data/user/0/com.company.ourapp/files/Pictures/
It is obviously an Android file path instead of a iOS file Path. Android's file system is different from iOS.
Here is the new image path:
"/var/mobile/Containers/Data/Application/215E777E-A624-487E-B687-6647F8C0D1DC/Documents/01_18_2021_04_24_07_98524.jpg"
This is the right path to iOS document folder in sandbox. See this document about the Application directories in iOS.
I think you should distinguish iOS and Android when retrieving the images.
Which essentially makes it impossible for us to see pictures taken from a previous build/version of the app.
If the path really changes with different versions, you can get the app version number at runtime and give different filePath to different version.
(While I think your problem is the difference between iOS and Android file path.)
QUESTION
Ive followed the instructions. MediaPlugin is fully installed in all three projects. Now, I am calling this:
...ANSWER
Answered 2020-Jun-07 at 02:44In iOS is required to have keys in your Info.plist
for NSCameraUsageDescription
and NSPhotoLibraryUsageDescription
in order to access the device's camera and photo/video library.
Such as :
QUESTION
I was following the documentation here https://github.com/jamesmontemagno/MediaPlugin but still encountered this issue.
Any ideas?
Update: I got it working already. Xamarin Forms and Xamarin Essentials packages under Android Project must also be updated. Here's a working one: https://github.com/arnelirobles/AppTestCamera
...ANSWER
Answered 2020-May-21 at 07:17Update: I got it working already. It appears that every time I create a Xamarin Forms Project it doesn't use the latest package version on Xamarin.Form and Xamarin.Essentials.
To resolve here's what I did. Via Nuget Package Manager
Xamarin Forms Project 1. Install Package Xam.Plugin.Media (5.0.1) 2. Update Xamarin.Forms Package (4.6.0.800) 3. Update Xamarin.Essentials Package (1.5.3.2)
Xamarin Android Project 1. Update Xamarin.Forms Package (4.6.0.800) 2. Update Xamarin.Essentials Package (1.5.3.2)
Xamarin.Forms and Xamarin.Essentials packages under Android Project must also be updated.
Here's a working one: https://github.com/arnelirobles/AppTestCamera
QUESTION
ANSWER
Answered 2020-May-05 at 00:44You should create a custom renderer.
First create a view in your share project, like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MediaPlugin
Install into your .NET Standard project and Client projects.
Please see the additional setup for each platforms permissions.
CI NuGet Feed: http://myget.org/F/xamarin-plugins
This plugin uses the Xamarin.Essentials, please follow the setup guide: http://aka.ms/essentials-getstarted.
By default, the library adds android.hardware.camera and android.hardware.camera.autofocus to your apps manifest as optional features. It is your responsbility to check whether your device supports the hardware before using it. If instead you'd like Google Play to filter out devices without the required hardware, add the following to your AssemblyInfo.cs file in your Android project:. Your app is required to have keys in your Info.plist for NSCameraUsageDescription and NSPhotoLibraryUsageDescription in order to access the device's camera and photo/video library. If you are using the Video capabilities of the library then you must also add NSMicrophoneUsageDescription. If you want to "SaveToGallery" then you must add the NSPhotoLibraryAddUsageDescription key into your info.plist. The string that you provide for each of these keys will be displayed to the user when they are prompted to provide permission to access these device features. You can read me here: New iOS 10 Privacy Permission Settings. If you want the dialogs to be translated you must support the specific languages in your app. Read the iOS Localization Guide.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page