apache / cordova-plugin-media-capture

Apache Cordova Media Capture Plugin
https://cordova.apache.org/
Apache License 2.0
307 stars 489 forks source link

Version 5.0.0 requires Android 12 and Node 16 #282

Closed joaolourencoge closed 8 months ago

joaolourencoge commented 8 months ago

Hello, Why does the new version 5.0.0 requires cordova-android v12?

This will impact other packages such as:

To support Android 13 (https://github.com/apache/cordova-plugin-media-capture/pull/262) How can we use the fix without updated to version 5.0.0?

erisu commented 8 months ago

Cordova-Android@12.x is set as the minimum requirement because it has the necessary SDK requirements defined for successfully building Android 13 related code.

Version 5.0.0 of this plugin contains code that was introduced in Android 13 (SDK 33) and will fail if the sdk configuration is wrong.

If you want to support Android 13 without upgrade cordova-android platform, you will need to fork the plugin, apply whatever PRs you want, test and fix on your on the issues that might appear.

Cordova most likely will not be able provide any support for customized plugins, custom platforms, or previous platform verions with modified SDKs out of its original support.

erisu commented 8 months ago

Forgot to add one more thing

growthengineering commented 8 months ago

@erisu thanks for the quick reply.

I was checking the differences between 4.0.0 and 5.0.0 https://github.com/apache/cordova-plugin-media-capture/compare/4.0.0...5.0.0

I am not able to identify anything which could explain the cordova android version upgrade. Are you able to identify where that applies?

To provide support to Android 13, I believe this should be enough: (https://github.com/apache/cordova-plugin-media-capture/pull/262)

Are u able to confirm?

Thanks in advance

erisu commented 8 months ago
            <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
            <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
            <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

And also anywhere in code that uses those permissions E.g. Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_IMAGES and Manifest.permission.READ_MEDIA_VIDEO

If you look up those permissions in Android Developer docs, you will see it was added in API 33.

Here is an example doc for one of those I listed above: https://developer.android.com/reference/android/Manifest.permission#READ_MEDIA_VIDEO

Cordova-Android 11 and old does not support API 33 right out of the box and would fail to build.

Cordova-Android 12 has been updated to support compiling API 33 right out of the box. That is why the requirement was bumped.

joaolourencoge commented 8 months ago

@erisu thanks for the reply. That's clear from our side. We will find the best way to move forward in our end.

Thanks