Skip to content

Multiple critical issues: unresolved version, invalid API usage, and native library alignment #2

@MehdiSekoba

Description

@MehdiSekoba

While integrating IRDebitCardScanner, I encountered multiple issues that block usage of the library in its current state.


1. Unresolved library version (1.0.2)

The README/documentation states that the latest version is 1.0.2, however Gradle fails to resolve it:

Failed to resolve: com.github.arefbhrn:IRDebitCardScanner:1.0.2

This suggests that version 1.0.2 is either not published, not tagged correctly, or not available on JitPack (especially for the migrate-to-kotlin branch).

Expected:
The documented version should be resolvable via Gradle.


2. ScanActivity.start() API mismatch with documented usage

The documentation/examples show the following usage:

ScanActivity.start(
    activity,
    resultLauncher,
    "Debit Card Scan",
    "Position your card in the frame so the card number is visible"
)

However, the actual available method signatures are only:

static fun start(activity: Activity): Unit
static fun start(
    activity: Activity,
    scanCardText: String,
    positionCardText: String
): Unit

As a result, the compiler produces the following error:

None of the following candidates is applicable:
static fun start(activity: Activity): Unit
static fun start(activity: Activity, scanCardText: String!, positionCardText: String!): Unit

There is no overload that accepts an ActivityResultLauncher, making the documented example invalid.

Impact

  • The example code cannot compile.
  • Integration with modern Activity Result APIs (and Jetpack Compose) is not possible using the current API.
  • Users are forced to rely on undocumented or unsafe workarounds.

Expected:
Either:

  • Provide a start() overload that supports ActivityResultLauncher,
    or
  • Update the documentation to match the actual API.

3. Native library alignment issue (arm64-v8a)

When using version 1.0.1, the build fails due to an unaligned native library:

The native library arm64-v8a/librsjni_androidx.so
(from com.github.arefbhrn:IRDebitCardScanner:1.0.1)
is not 16 KB aligned

This occurs with recent Android Gradle Plugin versions that enforce 16 KB page alignment for native libraries.

Analysis

  • The issue originates from the .so file packaged inside the artifact.
  • No custom ABI filters or NDK configurations are applied on the app side.
  • This indicates the native binary was built or packaged without proper alignment.

Impact

  • arm64-v8a builds fail.
  • Production builds and Play Store uploads are blocked.

Expected:
Rebuild and republish the native library with proper 16 KB alignment, or clearly specify which version is safe to use.


Environment

  • Library version(s): 1.0.1 / 1.0.2 (documented)
  • Android Gradle Plugin: (please specify)
  • Target ABI: arm64-v8a
  • Integration: Activity Result API / Jetpack Compose

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions