thegrizzlylabs / geniusscan-sdk-demo

Demo apps for Genius Scan SDK
30 stars 38 forks source link

Android demo-custom is broken on latest commit #71

Closed aelimill closed 8 months ago

aelimill commented 1 year ago

Latest commit (https://github.com/thegrizzlylabs/geniusscan-sdk-demo/commit/527d0baa0fa78dd014966c6e0ff6b3ae0d5c8f2d) broke android demo.

Fatal crash:


  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File com.geniusscansdk.demo.model.Page.getOriginalImage()' on a null object reference
        at com.geniusscansdk.demo.processing.BorderDetectionActivity.onResume(BorderDetectionActivity.java:51)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1413)

caused by:

 java.lang.ClassCastException: com.geniusscansdk.demo.model.Page cannot be cast to android.os.Parcelable
        at android.os.Bundle.getParcelable(Bundle.java:946)
        at android.content.Intent.getParcelableExtra(Intent.java:7485)
        at com.geniusscansdk.demo.processing.BorderDetectionActivity.onCreate(BorderDetectionActivity.java:45)

As Page implements Serializable now. Changing BorderDetectionActivity.onCreate page = getIntent().getParcelableExtra(EXTRA_PAGE); to page = getIntent().getSerializableExtra(EXTRA_PAGE); doesn't help as also Quadrangle doesn't implement Serializable so it will crash in BorderDetectionActivity.select method :)

guillaume-tgl commented 1 year ago

Thanks for reporting this issue, we're going to fix this in the next version of our SDK.