capacitor-community / photoviewer

⚡ Capacitor plugin to view table images with fullscreen and sharing capabilities.
MIT License
55 stars 27 forks source link

Compatibility with Android SDK 34 #56

Closed DupuyNicolas closed 3 months ago

DupuyNicolas commented 1 year ago

Describe the bug The plugin won't compile when targeting Android SDK 34. This is because of a change on the onFling method overriden by OnSwipeTouchListener Unfortunately, this method now takes a nullable "downEvent: motionEvent", so it must be updated accordingly in the method parameters, and must be checked or asserted below.

To Reproduce Steps to reproduce the behavior:

  1. Target SDK 34 on Android application
  2. Build the app
  3. See error in OnSwiperTouchListener

Expected behavior The plugin should compile with SDK 34.

gustavomodena commented 11 months ago

Any update? Im facing the same issue

jepiqueau commented 11 months ago

@DupuyNicolas @gustavomodena it will not be done before Capacitor 6 is released as i am not sure how Capacitor 5 is compatible with API34

andrerds commented 9 months ago

"Note: I encountered an issue after migrating to Capacitor 6, requiring me to download the latest version of Android Studio. After making changes to the marked lines, I successfully compiled the code.

In the OnSwipeTouchListener class and the 'onFling' function:

override fun onFling(
    downEvent: MotionEvent?,  // Change made in this line
    moveEvent: MotionEvent,
    velocityX: Float,
    velocityY: Float
): Boolean {
     var diffX = moveEvent.x.minus(downEvent!!.x)  // Change made in this line
jepiqueau commented 9 months ago

@andrerds thanks for this it will be helpful to know when i will do the migration when ionic will have release Capacitor6

JulienLecoq commented 6 months ago

Ionic has released Capacitor 6 since a few weeks now

jepiqueau commented 6 months ago

@andrerds @JulienLecoq @DupuyNicolas @gustavomodena Please read the Note i just published on the README file of github.com/capacitor-community/photoviewer/README.md.

andrerds commented 6 months ago

@andrerds @JulienLecoq @DupuyNicolas @gustavomodena Please read the Note i just published on the README file of github.com/capacitor-community/photoviewer/README.md.

Hello, my friend. Thanks a lot for your contribution, you are fantastic, congratulations. I hope everything goes well for you and your family. Family is a priority. Thank you for everything!

shiv19 commented 6 months ago

@jepiqueau Thank you for all the years of hard work you have put in for this community. I have nothing but admiration for your contribution to this eco system. Will you be moving any more plugins into the @capacitor-community namespace? Particularly the video-player. I'm fairly new to the ionic community and am looking to contribute to the plugins.

jepiqueau commented 6 months ago

@andrerds @shiv19 Thanks for your words, they go to my heart. @shiv19 the best if you want to contribute to the capacitor community is to talk to Mike Hartington mike@ionic.io

robingenz commented 3 months ago

This should be fixed in #63.