How to Check Internet Connection Continuously in Android | Java | Android Studio

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 77

  • @JHONTHERAP
    @JHONTHERAP Рік тому

    Thanks brother, from Colombia I improved it with automatic detection and session verification

  • @BinaryBridgeHQ
    @BinaryBridgeHQ Рік тому +1

    The video is great, but it is not up-to-date. This format is not supported after Android 10, but I still thank you for making this video.

  • @EchoENKO
    @EchoENKO 10 місяців тому

    Awesome

  • @Akshat_jain1008
    @Akshat_jain1008 Рік тому +1

    Amazing tutorial bro ❤❤

  • @MohammedMutwakil
    @MohammedMutwakil 3 роки тому +1

    Thank you very much for video, is it possible to remove dialog once internet is turn on ?

  • @VickyThakur-qr5wf
    @VickyThakur-qr5wf 2 роки тому

    Thank you for making such video but I have one dought that how to use snackbar instead of alert dialog

  • @saijannawar73
    @saijannawar73 3 роки тому +1

    Nice vdo

  • @gensky_t
    @gensky_t Рік тому +1

    Спасибо тебе ты лучший, помог решить проблему с интернет магазином🔥😉

  • @federicobartulucci1011
    @federicobartulucci1011 3 роки тому

    thanks genius! Greetings from Argentina!

  • @Oxino-h4d
    @Oxino-h4d Рік тому

    thanks a lot man

  • @prajwalvm1476
    @prajwalvm1476 3 роки тому +1

    Very knowledgeable and helpful video thank you.. keep posting good videos.

  • @Open_Minded_9
    @Open_Minded_9 Рік тому

    Thanks ❤

  • @visibleuser8973
    @visibleuser8973 2 роки тому

    it worked THNX BRO

  • @radhakrishna7794
    @radhakrishna7794 2 роки тому +1

    Thanks alot 💖.. it would be great if you had explain the code..

  • @bishnuabhay350
    @bishnuabhay350 3 роки тому

    Supper b video

  • @ghostrider4037
    @ghostrider4037 2 роки тому

    Just bravo...

  • @sallylunght6776
    @sallylunght6776 2 роки тому +3

    here the validity of the internet is not taken into account. you just have to activate the connection for the application to work even if you don't have data! I find it problematic

  • @efeeeeee212
    @efeeeeee212 3 роки тому +1

    thank you, bro. You rock.

  • @rafaelrodriguez4090
    @rafaelrodriguez4090 3 роки тому +2

    eres un pro

  • @mukeshsinhzala7292
    @mukeshsinhzala7292 3 роки тому +2

    super....

  • @RajeshSharma-gk3wf
    @RajeshSharma-gk3wf 3 роки тому

    Super duper hit video

  • @anushakurapati9219
    @anushakurapati9219 2 роки тому

    Very useful and helpful, if we use this class for multiple layouts and API,s how can we fix

  • @Enterate12
    @Enterate12 2 роки тому

    Perfecto! suscrito

  • @creativearts4917
    @creativearts4917 2 роки тому +1

    little help please...
    how do i make it to check in every activity
    do i need to paste the same start/stop functions in each and every activities or there's any other way???

    • @durejagauravable
      @durejagauravable 2 роки тому

      Hello, did you get your answer? Please share with me if you resolved the issue.

    • @creativearts4917
      @creativearts4917 2 роки тому +1

      @@durejagauravable yes I got the solution ✌🏻

    • @creativearts4917
      @creativearts4917 2 роки тому

      @@durejagauravable you need to paste that start stop functions in every activity which requires that feature✌🏻

    • @durejagauravable
      @durejagauravable 2 роки тому

      @@creativearts4917 Please tell me how to do this...

    • @durejagauravable
      @durejagauravable 2 роки тому

      @@creativearts4917 No I need without this...

  • @rafaelgrayy
    @rafaelgrayy 2 роки тому

    Hello! 👋 When I exit and visit the app again, the notification windows double up. Can you solve this problem? Thank you!

  • @md.shorifulhasan3149
    @md.shorifulhasan3149 3 роки тому

    Supper video

  • @stoicdilwar5618
    @stoicdilwar5618 Рік тому

    In my case, the project does the exact opposite work; when I turn on the data, the alert dialog pop up and when I turn off the data, after tapping on retry button it works . Can you tell me how to fix it ?

    • @rubaiyat_bf
      @rubaiyat_bf Рік тому

      In my case too!!

    • @rubaiyat_bf
      @rubaiyat_bf Рік тому

      it happens when you don't put '!' in line 11 of NetworkChangeListener 5:23

  • @RajeshSharma-gk3wf
    @RajeshSharma-gk3wf 3 роки тому

    Mujhe aap ki help cahiye

  • @mahmutdal4932
    @mahmutdal4932 Рік тому

    API level 23 and later, new method for connection.
    import android.content.Context;
    import android.net.ConnectivityManager;
    import android.net.Network;
    import android.net.NetworkCapabilities;
    public class Common {
    public static boolean isConnectedToInternet(Context context) {
    ConnectivityManager connectivityManager = (ConnectivityManager)
    context.getSystemService(Context.CONNECTIVITY_SERVICE);
    if (connectivityManager != null) {
    Network network = connectivityManager.getActiveNetwork();
    NetworkCapabilities capabilities = connectivityManager.getNetworkCapabilities(network);
    return capabilities != null && (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)
    || capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR));
    }
    return false;
    }

  • @MohitSingh-jv9ot
    @MohitSingh-jv9ot 2 роки тому

    i want to switch activity this that code also want some delay b/w activities....i tried several times but not work ... Please help me.....🙏🙏🙏

  • @babajimotivation7305
    @babajimotivation7305 2 роки тому

    🙏🙏🙏

  • @RajeshSharma-gk3wf
    @RajeshSharma-gk3wf 3 роки тому

    Hello sir ji

  • @TGEMalguzBane
    @TGEMalguzBane 3 роки тому

    thanks but networkinfo is decraped, dont have a new mode?

    • @codewithdarshil8708
      @codewithdarshil8708  3 роки тому

      Yes, It is depreceated from API 29. I will create new video accordingly. Thank you for sharing!

    • @sickdiet8290
      @sickdiet8290 3 роки тому

      @@codewithdarshil8708 make it fast bro

    • @sickdiet8290
      @sickdiet8290 3 роки тому

      @@codewithdarshil8708 in webview

    • @sickdiet8290
      @sickdiet8290 3 роки тому

      @@codewithdarshil8708 hey can I get your insta ID

    • @ClintonCanarias
      @ClintonCanarias 3 роки тому

      @@codewithdarshil8708 did you create new video?

  • @RajeshSharma-gk3wf
    @RajeshSharma-gk3wf 3 роки тому

    Hello sir

  • @RahulSingh-jc8gv
    @RahulSingh-jc8gv 2 роки тому

    Bhai back button click karne par back hi nahi ho raha hai Kya kare

  • @RajeshSharma-gk3wf
    @RajeshSharma-gk3wf 3 роки тому

    Hello

  • @anshumanbharatiya3918
    @anshumanbharatiya3918 3 роки тому

    my internet connection is on but show the dislog layout

  • @MAXT44
    @MAXT44 3 роки тому

    Please provide me code

  • @RajeshSharma-gk3wf
    @RajeshSharma-gk3wf 3 роки тому

    Please sir

  • @156sparsh7
    @156sparsh7 3 роки тому

    bro github link

  • @azadmahmodi8044
    @azadmahmodi8044 3 роки тому

    I need the source code

  • @ashifkhan4867
    @ashifkhan4867 3 роки тому

    sir mere mobile m ulta kaam kr raaha ha
    matlab jab internet hota h to inertnet dialog aata h
    aur jab internet nhi hota tab nhi aata
    m kya kruu

    • @codewithdarshil8708
      @codewithdarshil8708  3 роки тому +1

      Please watch it again carefully.🙂.

    • @AndroiTGujarati
      @AndroiTGujarati 3 роки тому

      @ashif khan
      in NetworkChangeListener class if condition check shoud be (!Common.isConnectedToInternet(context))
      check that condition

    • @stoicdilwar5618
      @stoicdilwar5618 Рік тому +1

      @@AndroiTGujarati Got the solution. Thanks.

  • @sickdiet8290
    @sickdiet8290 3 роки тому

    Working great but retry button is not reloading it simply disappear I want to reload the webpage so how to do that ?
    Please help 🙏

  • @000sakis
    @000sakis 3 роки тому

    git rep? are we supposed to copy this code from the video lol

  • @muhammadfarhad8682
    @muhammadfarhad8682 3 роки тому

    sir jab wifi on hota he tab bhi dialog show krta he esa q