[Media] Taking a video on Marshmallow(6.0.1) always returns null.
See original GitHub issueFrom @swansca79 on May 10, 2016 13:0
Please take a moment to fill out the following (change to preview to check or place x in []):
This is a
- Bug
- Feature Request
Which plugin does this impact:
- Battery
- Connectivity
- Contacts
- DeviceInfo
- ExternalMaps
- Geolocator
- Media
- Permissions
- Settings
- Text To Speech
- Vibrate
- Other:
Version Number of Plugin: 2.3.0 Device Tested On: Nexus 6P 6.0.1 w/ April Security patches Simulator Tested On:
Expected Behavior
Taking a video should return a MediaFile result.
Actual Behavior
Always returns null.
Steps to reproduce the Behavior
When this was originally implemented it worked, and all I can say for sure was that it was before the April security patches on my Nexus 6P. This bug does not happen on pre-marshmallow devices.
- New forms project 2.2.0.31 (also happens on 2.1.0.6529)
- Add media plugin
- Run this code
async void MakeNewVideo(){
IMedia media = CrossMedia.Current;
await media.Initialize ();
if (media.IsTakeVideoSupported) {
MediaFile result = await media.TakeVideoAsync (new StoreVideoOptions (){ Quality= VideoQuality.Medium });
if (result != null) {
VideoPathLabel.Text += result.Path;
}
}
}
Copied from original issue: jamesmontemagno/Xamarin.Plugins#297
Issue Analytics
- State:
- Created 7 years ago
- Comments:36 (12 by maintainers)
Top Results From Across the Web
MediaCodec returns null for getOutputImage on real devices
I'm trying to grab the Image of a Video via the MediaCodec using the getOutputImage method (Framework used: Exoplayer). I'm NOT using a ......
Read more >How to change camera importer setting from always to just ...
I selected camera importer, but now everytime I connect the Canon camera it automatically opens camera importer. How do I stop this and...
Read more >OPO Android 6.0.1 boot fail - HELP?!
Hi.I've just updated to android 6.0.1 (the CyanogenMod version ofc.) last night via the OTA.And after it had updated, and was done with...
Read more >Android 6.0 APIs
Android 6.0 (M) offers new features for users and app developers. This document provides an introduction to the most notable APIs.
Read more >[Bug] Null results with Voice Recognition Service on Google ...
The voice recognition service for android from the Google Quick ... are using SpeechRecognizer and onResults method is always return "null".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will need someone to debug the source code as of the 5 android devices I have none of them have 6.0.1 on them.
There is some issue when you use the FileProvider with this plugin in Android versions lower than 7.0. The URL that is created is not working, it seems that there is some permissions issue. I have two physical phones (Samsung S4 and Samsung Galaxy Prime, both Lollipop 5.0 and 5.1) that were not working due to this problem. I tried to fix the permissions issue to use the FileProvider but I couldn’t so I fix it avoiding the FileProvider at all in Android Versions lower than 7.0. Now I have both phones working without side effects!
Unfortunately, you have to touch the source code to get the fix.
Use this code