Check Internet Connectivity And Subscribe LiveData to Network Changes

  Рет қаралды 2,415

CodingSTUFF

CodingSTUFF

Жыл бұрын

In This Video, I am gonna show you how to check network connectivity and subscribe livedata to it in order to listen network connectivity changes.
Connect with us -
Follow me on Instagram - codingstuff070?...
Gmail - codingstuff070@gmail.com
To Watch MultiViewType RecyclerView Tutorial - • Multi ViewType Recycle...
To Watch Complete Notes App Tutorial - • Notes App (MVVM Archit...
To Watch Complete To-Do App Firebase Series - • To-Do List App Using F...
To Watch To-Do List App using SQLite Tutorial - • To Do App Using Sqlite...
To Watch Complete JSON and API Tutorial Series - • Complete JSON and API ...
To Watch Complete Instag Blog App Tutorial - • Instag Blog App ( Fire...
To Watch Complete FireStore App Tutorial - • Cloud FireStore (2020)
To Watch Complete Firebase Tutorial - • Firebase Database as B...
To Watch Calculator App Tutorial - • How to Create Calculat...

Пікірлер: 7
@NikNewNik
@NikNewNik 6 ай бұрын
Thank you very much, man!!! It's working! Subscribed to your channel🙂
@greatrespect1549
@greatrespect1549 5 ай бұрын
Can you provide the source code as well. It helps to understand the code better.
@gtuei7310
@gtuei7310 Жыл бұрын
красава че
@AkhilBhatnagar-
@AkhilBhatnagar- Жыл бұрын
brother I am following your coding stuff channel (To do app) and i posted a question regarding my project on stack overflow, please check it out...
@lucasianii8178
@lucasianii8178 5 ай бұрын
Hi guys, does any body know how I can get IP ADDRESS of devices connected to my mobile phone hotspot in kotlin?
@Arman_ihsan_02
@Arman_ihsan_02 3 ай бұрын
First create a kotlin class or u can use activity main import android.content.Context import android.net.wifi.WifiManager import java.net.InetAddress import java.util.* fun getConnectedDevices(context: Context): List { val wifiManager = context.getSystemService(Context.WIFI_SERVICE) as WifiManager val dhcpInfo = wifiManager.dhcpInfo val ip = dhcpInfo.ipAddress val subnet = ip and dhcpInfo.netmask val connectedDevices = ArrayList() for (i in 1 until 255) { val ipAddress = subnet or i val address = InetAddress.getByAddress( byteArrayOf( (ipAddress and 0xff).toByte(), (ipAddress shr 8 and 0xff).toByte(), (ipAddress shr 16 and 0xff).toByte(), (ipAddress shr 24 and 0xff).toByte() ) ) if (address.isReachable(1000)) { // Timeout in milliseconds connectedDevices.add(address.hostAddress) } } return connectedDevice
@rafaqatmehmood
@rafaqatmehmood 4 ай бұрын
ITS NOT WORK ME
95% Don't Understand THIS About Coroutines (Main-Safety)
9:38
Philipp Lackner
Рет қаралды 27 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 26 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 10 МЛН
Check Internet Connection Like a SENIOR in Flutter - Globally
2:31
No Internet Checking - MVVM News App
17:02
Philipp Lackner
Рет қаралды 31 М.
I Electroplated a 3D Printed C-3PO and it looks insane now
10:41
HEN3DRIK - Electroplating 3D Prints
Рет қаралды 27 М.
Elon Musk update on 2nd human who got Neuralink implant
9:12
Lex Clips
Рет қаралды 63 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 232 М.
Monitoring a Network Connection in Realtime with LiveData
15:08
CodingWithMitch
Рет қаралды 28 М.