novoda/merlin

Not working in One plus 5t

SumukhaK opened this issue · 6 comments

Hey, I'm using your service to detect internet disconnection and showing an alert message on android. It is working fine in my Moto g4+, Poco f1, emulator(which is pixel 2xl). But in One Plus 5t (Android version 8.1.0, Oxygen OS 5.1.7) it doesn't seem to work. Simply no alert when it is disconnected from the network. No crashes.

My code snippets:

[merlin = new Merlin.Builder().withAllCallbacks().build(context); 

merlin.registerDisconnectable(new Disconnectable() {
            @Override
            public void onDisconnect() {

                showAlert("Please check your internet connectivity and restart the app !");
            }
        });

@Override
    protected void onResume() {
        super.onResume();
        merlin.bind();
      
     
    }


    @Override
    protected void onPause() {
        super.onPause();
        merlin.unbind();
    }


Hi @SumukhaK. When you say "internet disconnection" do you mean disconnected from Wifi but still connected to cellular or disconnected from both? I just want to make sure I have the full picture before I formulate a plan to check and respond. Thanks.

In the case of one plus 5t, I only tested with cellular data. Moto g4+ and Poco work fine with both WiFi and Cellular data disconnection.

Thanks for the clarification @SumukhaK, I'll try and take a look into this issue for you.

Sorry to bother you, do you have any updates ?!

I'm sorry but I have not had the opportunity to work on this as of yet. I can help you to open a Pull Request with a fix if you are able to locate the issue.

Could you @SumukhaK provide a small repo with the exact code to reproduce this? I've tried some quick tests but I was unable to get this behaviour.