The plugin's on-device proof (Mob.Plugin.SelfTest), run by
mix mob.selftest and mob_ci for every activated plugin.
One read-only native call, background_status/0 (MobBackground.status/0).
It never starts the keep-alive: no foreground service, no notification, no
audio session, nothing to undo.
What proves the native side initialized:
- iOS: the Objective-C NIF is linked and answers from the app's
Info.plistand the keep-alive flag.:idle/:runningpass.{:error, :no_audio_background_mode}fails: withoutUIBackgroundModesaudiothe silent session can't keep the app alive. - Android: the zig NIF answers
{:error, :bridge_not_registered}untilMobBackgroundBridge.register()has cached the bridge class and itsbackground_statusmethod; after that the answer comes from Kotlin, which checks the bridge has its Activity and that the app manifest declaresBeamForegroundServicewithforegroundServiceType="dataSync"(resolved throughPackageManager, so it also proves the class the build copied in is the one declared).:idle/:runningpass;:bridge_not_registered,:no_activity,:service_not_declaredand:service_not_data_syncfail, sincekeep_alive/0would silently do nothing in that host.
:running passes because the app itself may hold the keep-alive on; the
test doesn't touch it. Any other answer fails, and so does the host stub's
nif_not_loaded (the NIF isn't linked into the build). Nothing here needs
hardware or a user, so the test never skips.