Skip to content

Conversation

@manuquentin
Copy link
Contributor

@manuquentin manuquentin commented Sep 16, 2019

Use case :
On Android, the application is in background since more than 20mn. The OS will kill all connection (even between the Java module and Javascript).

We need to have a way to see if the Javascript application is reachable by the Java codebase, for that I've introduced an event checkReachability with a timeout.

It's like a ping between the Java and Javascript codebase.

First case: the application is reachable :

  1. Callkeep triggers checkReachability, then the application reply with setReachable.
  2. After 2s the timeout is triggered but as we received the setReachable method I'll do nothing

Second case: the application is not reachable.

  1. Callkeep triggers checkReachability, the application will not calls setReachable.
  2. After 2s the timeout is triggered but setReachable wasn't called.
  3. CallKeep will wakeup the application (in headless mode) like the application was killed.

@manuquentin manuquentin merged commit f136200 into master Sep 25, 2019
@manuquentin manuquentin deleted the check_reachability branch September 25, 2019 12:04
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

Successfully merging this pull request may close these issues.

2 participants