Repository navigation
Added
- On-device self-test (MOB-418).
MobNfc.SelfTestimplements
Mob.Plugin.SelfTestand is declared in the manifest asselftest:. It
makes one read-onlynfc_available/0call:truepasses,false(the
native side answered, but there is no radio, as on every simulator and
emulator) is{:skip, :needs_hardware},:disabledis a skip naming the
switched-off radio, and an error answer or the host stub's
nif_not_loadedfails. Run it withmix mob.selftestfrom a host app
(mob_dev 0.7.17).mob_versionin the manifest is now~> 0.9.
Changed
-
Requires mob >= 0.9.15 (was
~> 0.7), forMob.Plugin.SelfTest;
mob_versionin the manifest is now~> 0.9(was~> 0.7). Hosts on
mob 0.7 or 0.8 must upgrade before taking this release. -
Android:
nfc_available/0no longer answersfalsewithout asking the
radio.falsenow means only "no NFC hardware"; the other answers are::disabled: the radio is present but switched off;{:error, :bridge_not_registered}:MobNfcBridge.register()never ran
or the method-id lookup failed;{:error, :no_activity}: the bootstrap hasn't handed the bridge an
Activity;{:error, :no_jni_env}: no JNIEnv could be attached;{:error, :bridge_exception}: the Kotlin side threw (a pending Java
exception is now detected and cleared);{:error, :unknown_state}: the bridge returned a code the NIF doesn't
know.
The Kotlin bridge method is now
nfc_state(): Int(was
nfc_available(): Boolean).MobNfc.available?/0is unchanged (still
falsefor all of these). Method-id lookups innativeRegisternow clear
a pendingNoSuchMethodErrorso one missing method can't poison the rest.