Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint error on getScaledFrameAtTime #348

Open
MilleBii opened this issue Jan 10, 2025 · 0 comments
Open

lint error on getScaledFrameAtTime #348

MilleBii opened this issue Jan 10, 2025 · 0 comments

Comments

@MilleBii
Copy link

*receive_sharing_intent-2cea396843cd3ab1b5ec4334be4233864637874e*\android\src\main\kotlin\com\kasem\receive_sharing_intent\ReceiveSharingIntentPlugin.kt:160: Error: Call requires API level 27 (current min is 19): android.media.MediaMetadataRetriever#getScaledFrameAtTime [NewApi]
val bitmap = retriever.getScaledFrameAtTime(-1, OPTION_CLOSEST_SYNC, 360, 360)

Please put this code to fix building error
// val bitmap = retriever.getScaledFrameAtTime(-1, OPTION_CLOSEST_SYNC, 360, 360)
val bitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
retriever.getScaledFrameAtTime(-1, OPTION_CLOSEST_SYNC, 360, 360)
} else {
// Fallback for older devices
retriever.getFrameAtTime(-1, OPTION_CLOSEST_SYNC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant