akshay2211 / PixImagePicker

Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.
Apache License 2.0
860 stars 217 forks source link

Please provide a doc that helps migrate 1.5.6 code to the latest version #276

Open inder123 opened 1 year ago

inder123 commented 1 year ago

Is your feature request related to a problem? Please describe. We used 1.5.6 version in our code and just call Pix.start(@myActivityContext, options) and use onActivityResult() method to handle the response. I can't figure out how to convert this code to the latest 1.6.3 version since there is no activity (similar to Pix) that I can call.

Describe the solution you'd like The options could be:

  1. A clear doc explaining how to rewrite the old code to fit the new usage
  2. A sample activity that is equivalent to Pix that we just call

I need to make this transition since the old Pix library is ONLY available in jcenter() and jcenter() is deprecated. Thanks

duadhruv commented 1 year ago

@inder123 did you figure out the migration?

inder123 commented 1 year ago

No. I thought of taking the Pix activity from the previous version and rewriting it with the new one, but didn't get around to do it.

duadhruv commented 1 year ago
addPixToActivity(R.id.container, options) {
          when (it.status) {
              PixEventCallback.Status.SUCCESS -> //use results as it.data
              PixEventCallback.Status.BACK_PRESSED -> // back pressed called
          }
      }

Were you able to convert this to a java code?