Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Confused about serviceLost when discovering in the foreground #162

Open
githubforzjm opened this issue Sep 30, 2020 · 5 comments
Open

Confused about serviceLost when discovering in the foreground #162

githubforzjm opened this issue Sep 30, 2020 · 5 comments

Comments

@githubforzjm
Copy link

Hello,
This bonjour library is great!!!

I have some confusion about discovering process
When the app comes into the foreground, I call browse with a BrowseListener and call stop when the app comes into the background.

Sometimes, I called browse() when app is in the foreground after stays in the background for a few minutes (Change Network or Nothing)
and serviceLost() has been called before serviceFound().
The odds of this happening are high, especially on Huawei phones and this did not happen with iPhone Application
I have tried to found out where serviceLost() method was called but got no results.

There are some differences between jni source code in your project and Apple's mDNS source code from my iOS colleague,

Which version of Apple mDNS are you using and is there any solution to the problem I'm talking about?

Many thanks

@andriydruk
Copy link
Owner

Hi,

Could you reproduce this issue in the Sample app? Or maybe you can write a test that fails with the current codebase?
I use mdnsresponder from Android Open Source code
https://android.googlesource.com/platform/external/mdnsresponder/

@githubforzjm
Copy link
Author

githubforzjm commented Oct 10, 2020

@andriydruk I reproduced this issue in the Sample app with both Rx2DnssdEmbedded and Rx2DnssdBindable(just lock and unlock screen)
I uploaded the log file, please check it for me

@githubforzjm
Copy link
Author

@githubforzjm
Copy link
Author

WX20201010-115903

@githubforzjm
Copy link
Author

WX20201010-120541

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

No branches or pull requests

2 participants