benlau/quickandroid

Image Picker Question

Closed this issue · 2 comments

I would like to understand the reasons why the ImagePicker has been implemented in that way through the SystemDispatcher ?

Cheers

I design component in a way that it must be compilable for all platform. Having each component to deal with JNI directly is quite trouble. It needs a lot of #ifdef/#endif statement. Moreover, coding in JNI is another headache.

SystemDispatcher is convenience.

  1. No need to handle JNI type conversion
  2. No need to find out why JNI crash.
  3. It won't crash if Java file is missing
  4. It don't need #ifdef/#endif block

Thanks for your explanation, those are good reasons to do that. Currently I'm just looking for the native ImagePicker in android. Also, I'm always a bit concerned about having large dependencies in my project (since it can be very time consuming to maintain them and it increases building time as well). So for now I'm inclined to implement a very simple ImagePicker (since it would be just a few lines of JNI).

Cheers