Android library for finding connected devices on same WiFi network. It can provide IP Address, device name, MAC Address and vendor names.

Overview

Android WiFi Tools

Android library for finding connected devices on the same WiFi network. It can provide IP Addresses, device names, MAC Address and vendor names.
"Buy Me A Coffee"

Usage

Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency

dependencies {
    implementation 'com.github.tejmagar:AndroidWiFiTools:1.0.2'
}

Add Permission

<uses-permission android:name="android.permission.INTERNET"/>

Find Connected Devices

 DevicesFinder devicesFinder = new DevicesFinder(this, new OnDeviceFindListener() {
            @Override
            public void onStart() {

            }

            @Override
            public void onDeviceFound(DeviceItem deviceItem) {
                
            }

            @Override
            public void onComplete(List<DeviceItem> deviceItems) {

            }

            @Override
            public void onFailed(int errorCode) {

            }
        });
        
devicesFinder.start();

Set Timeout

Increasing timeout value may give you better results.

devicesFinder.setTimeout(5000).start();

Get Mac Address from IP Address

String macAddress = MacAddressInfo.getMacAddressFromIp("192.168.1.1");

Before running this code, make sure you have already run deviceFinder.start(); method.
Returns device Mac Address. If not found, it will return "unknown" or Constants.UNKOWN

Get current device IP Address

String ipAddress = devicesFinder.getCurrentDeviceIpAddress();

Get current device Mac Address

String currentDeviceIpAddress = devicesFinder.getCurrentDeviceIpAddress();
String currentDeviceMacAddress = MacAddressInfo.getCurrentDeviceMacAddress(currentDeviceIpAddress);

Get vendor name from Mac Address

String vendorName = VendorInfo.getVendorName("94:17:00:3a:f9:09");

returns device Mac Address. If not found, it will return "unknown" or Constants.UNKNOWN

VendorInfo.init(context); will be automatically called while starting the device finder. If not, make sure you have initialized it first.

You might also like...
An app which displays questions from Stack Exchange from it's api. Can search questions with tags as well. Uses MVVM architecture, dependency injection, coroutines, retrofit2 for network calls

Stack Exchange app What the app does? Shows a list of trending questions from stack exchange api Can search for the desires question. Can add tags to

Messing with Skyblock players in fashion (Sorry @My-Name-Is-Jeff , not enough trolling)

WARPT WARPT is a mod that messes with the average skyblock player's session. You will hate using this mod, as much as I hate skyblock in its current s

Messing with Skyblock players in fashion (Sorry @My-Name-Is-Jeff , not enough trolling)

WART WART is a mod that messes with the average skyblock player's session. You will hate using this mod, as much as I hate skyblock in its current sta

This repo provides a sample application that demonstrates how you can speed up the authentication experience for frontline workers on shared devices using QR codes.

Project This repo has been populated by an initial template to help get you started. Please make sure to update the content to build a great experienc

This app aims at helping people keep track of their job applications, and remind them regularly about the same.
This app aims at helping people keep track of their job applications, and remind them regularly about the same.

Applications Tracker Lately I have been applying for many roles, and it has become a hard task to keep track of all the applications. Spreadsheets are

Source code of JekyllEx Android App which can manage your Jekyll blog directly from your Android device!
Source code of JekyllEx Android App which can manage your Jekyll blog directly from your Android device!

JekyllEx Android App Built with ❤︎ by Gourav Khunger 🚀 Introduction JekyllEx is an Android App that allows you to manage a Jekyll Blog directly from

weiV(pronounced the same as wave), a new declarative UI development framework based on the Android View system.

weiV(pronounced the same as wave) 简体中文 if ("weiV" == "View".reversed()) { Log.d( "weiV", "It means Inversion of Control, you shoul

AlarmIT is a simple alarm app. The alarms can be turned off via three methods - normal turnoff, by shaking the device a number of times, by solving maths questions.
AlarmIT is a simple alarm app. The alarms can be turned off via three methods - normal turnoff, by shaking the device a number of times, by solving maths questions.

Kicking Off Hacktoberfest with ACM-VIT! AlarmIT AlarmIT is a simple alarm app. The alarms can be turned off via three methods - normal turnoff, by sha

A general purpose kotlin library that use kotlin coroutines, flows and channels to provide timer features with the most easy and efficient way

Timer Timer is a general purpose kotlin library that use kotlin coroutines, flows and channels to provide timer features with the most easy and effici

Comments
  • Amazing library, but onFailed should return a message not an errorCode

    Amazing library, but onFailed should return a message not an errorCode

    onFailed should return a message so we can get to know what's really wrong, i think errorCode is not clear, also i tested this on a printer, an apple and a huawei devices but i couldn't get the device name of it, but the vendor name is working okay... i wanna commend you wholeheartedly for saving my job, i'll also like to spend time to improve this library and maintain it if possible. please include a buyMeCoffee link so people who find it worthy like me can send you a token. thanks Dremo

    opened by AbGhost-cyber 2
  • Notify listener from background worker

    Notify listener from background worker

    We got cast exception due to casting the context to activity if we passed a context of background worker or something like that. ((Activity)context).runOnUiThread(() -> deviceFindListener.onDeviceFound(deviceItem));

    Can you provide another solution for notifying the listener without depending on activity?

    opened by ashraf-atef 1
Releases(1.0.5)
Owner
Tej Magar
Tej Magar
A library for Android to get the market name of the device.

GoogleSupportedDevices A library for Android to get the market name of the device. Getting Started Include the library in your build.gradle. implement

David González 7 Dec 4, 2022
An android app make a one-stop solution for finding the desired reading or research partner, sell their own products, and also be a tutor

The purpose of this project is to make a one-stop solution for finding the desired reading or research partner, sell their own products, and also be a tutor.

Md.Asraful Islam Asif 4 Dec 14, 2022
CCDroidX is to Android what CCMenu is to Mac and what CCTray is to Windows

CCDroidX CCDroidX is to Android what CCMenu is to Mac and what CCTray is to Windows. CCDroidX is free, as in freedom, build monitoring & alert tool. I

Aung Kyaw Paing 10 Oct 12, 2022
A rewrite of the popular project GitUp that works in Linux, Mac, and Windows.

GitDown This is a rewrite from the ground up of the popular GitUp library available on Mac. It is built using Kotlin and Compose Desktop from Jetbrain

Cody Mikol 20 Dec 16, 2022
A search tool for GFE names in Kotlin

GFE Search Generator There are currently tens of thousands of known variants of the Human Leukocyte Antigen (HLA) genes, the genes most responsible fo

Carlos Valencia 1 Jan 21, 2022
A lightweight super-fast wireless file sharing application built on WiFi Peer-to-Peer technology.

ZipBolt ZipBolt is a file-sharing platform that allows digital devices to share files at incredible speeds using WiFi Peer-to-Peer technology. ZipBolt

Prosper Ekwerike 9 Sep 22, 2022
Library to change Android launcher App Icon and App Name programmatically !

AppIconNameChanger Change Android App launcher Icon and App Name programmatically ! Download Demo APK from HERE Kindly use the following links to use

Prabhakar Thota 587 Dec 29, 2022
HyperUPnP is Android Application that lets you to Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device.

Hyper UPnP Android UPnP/DLNA client Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device. Int

Var Bhat 8 Jul 17, 2022
The app has got fullscreen Turkey map via Huawei Map. App selects random province and shows it borders on the map than user will try to guess the provinces name.

Il Bil App Introduction I will introduce you to how to implement Account Kit, Map Kit, Game Service. About the game: The app has got fullscreen Turkey

Gökhan YILMAZ 4 Aug 2, 2022
NativeScript empowers you to access native platform APIs from JavaScript directly. Angular, Capacitor, Ionic, React, Svelte, Vue and you name it compatible.

NativeScript empowers you to access native APIs from JavaScript directly. The framework currently provides iOS and Android runtimes for rich mobile de

NativeScript 22k Dec 31, 2022