Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] SDK usage when app is closed #8

Open
pnogier opened this issue Jul 8, 2024 · 1 comment
Open

[QUESTION] SDK usage when app is closed #8

pnogier opened this issue Jul 8, 2024 · 1 comment

Comments

@pnogier
Copy link

pnogier commented Jul 8, 2024

Hi there,

We recently implemented the SDK into our React Native mobile app.
So basically we require the user to do a specific action on our app so the SDK is initialized with its proper login information, then he can unlock its doors.
Everything is working properly so far, but the doors won't unlock if the app is killed.

Is this the expected behaviour ? Or am I missing something important to make it work when the app is killed ?

@pnogier pnogier changed the title SDK usage when app is closed [QUESTION] SDK usage when app is closed Jul 8, 2024
@agap
Copy link
Member

agap commented Jul 9, 2024

Hmm, no, that doesn't look like the expected behaviour. If we're talking about Android SDK then it's based on the Host Card Emulation facilities provided by the Android OS. Basically, any time you touch an NFC reader with your smartphone, the OS is supposed to wake up / cold start the app, spin up an instance of a class that extends HostApduService, and then the OS starts feeding incoming data packages to this service.

So it shouldn't matter if the app is killed or not, as the OS is supposed to resurrect it each time there is an incoming NFC connection.

You said that the user has to do a specific action on your app so the SDK is initialized with its proper login information - are they supposed to do that each time they open the app? Or do you sign in them once, store the login data in the local cache, and then reuse that login for all subsequent unlocks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants