OUI Lookup Database for android - java

I know this question is asked several times here but I didn't find any helpful answer
I'm working to develop an application in which I'm search wifi connected devices and I have to show vendor names of each device there are some APIs like
http://api.macvendors.com/00:5a:13:72:3f:64
which provide lookup against each MAC address but I can't afford to trigger that API for each device
I want to download OUI database once or want to add in my app that when I open app all data already be there for lookup.

Try to download XML File located here Cisco vendorMacs.xml
One more source for the same file Cisco vendorMacs.xml updated
It contains updated and complete OUI database.
Disclaimer: I'm the founder of this website

Related

How to access directly internet on WearOS app

I am looking for My data on wear OS app to send to my external apache server with php and mysql.
Ultimately I need watch sensor data in MySQL database, So i created a POST request page using php. How do I send POST request?
Note: I am not using mobile phone between WearOS app and My server. WearOS is connected to internet via WiFI
Please if you know any solution help me
FYI: I tried basic things given at https://developer.android.com/training/wearables
Using Smart Watch with API level 23
Regards
Unfortunately your watch system version is too old. I strongly recommend you to buy a new watch or try update to Wear OS 2.x (API25) if your device is still under maintain.
If you insist on using current device the only way to access the Internet is via mobile phone. You can not send HTTP requests directly.
But the old version system should not be able to connect the WiFi. Please confirm your version at first. If your API level equal or larger than 25, you can access the Internet as same as phone using OkHttp or others you like.

Host database using Android phone

Here is the current scenario:
I have two(2) Android phones.
Android Phone 1 as the server phone.
Android Phone 2 as the client phone.
Here is what I want to do:
I want to create an Android-based app (E.g. Student Information app) where it will have basically two (2) modes:
Server - for adding, editing and deleting data on a local database.
Client - for viewing data from the database of the server.
The app will be installed to Android Phone 1 and set to Server mode.
The app will be installed to Android Phone 2 and set to Client mode.
I want to ask these questions:
I want to locally host the database of the Server app, so that Client app will be able to view the data. Is this possible?
If yes, how can I do it?
Note:
I am currently a web developer so I know that connected on the same network is a requirement.
I have implemented the same concept on a medium business where the web-based system is locally hosted so that computers on the same network can access it.
Suggest everything that you want to suggest, except the disadvantage of doing this concept. I am aware of some obvious disadvantages based from my research and willing to face the disadvantages provided that I will be able to implement the concept.
Rooting the phones is an option.
I want to accommodate small-sized business that is why I want to use Android phones rather than using Desktop Computers/Laptop.
I have read similar suggested questions here based on my title.
We have done the exact same thing in my company. The way we solved this is that the server exposes a service using the Android NSD API, so the clients (using the same API) can find it on the network. And after a client has connected to the server, the server sends its database file (yes, the .db file in /data/data/...) to the client via OutputStream. When the client receives the entire database and checks for its integrity, it copies it to its own /data/data/... and restarts part of the app.
Android NSD

Host files on cloud from an app

I'm doing an app similar to Instagram. I want to save the files that the users upload to the app to a central server. I have tried different solutions but none has worked. My idea is use Box, Google Drive, Mega or similar to host these files. I had implemented some of these but always they ask for the credentials to the users and if the user has an account, the file finally is hosted in his cloud. ¿Is it possible does a central file server from the app without asking for the credentials with these services or know you some service that fulfills my objective? I'm searching for a service that offers a free space with an expandable space paying a fee. (Like Box, Drive...)
Thank you and sorry for my English.
After investigate a lot, and with the help of your answers I had found the way to store files on a central server from Android.
I want to highlight two ways:
Using a Parse Server
Using Google Firebase
The two options are very well documented and you can try they for free.
I have tried back4app.com and buddy.com for Parse server and the free tier of Google Firebase and I have decided to use any Parse server instead of Firebase for the independece that this platform offers.

Is there a way to check where from app is installed

In my project I want to know from what website or android market, my application has been downloaded and installed.
Now I see two ways:
1) Use mobile browser storage to save location
2) Generate application for each site in the system
Both of them enough for my project, but I want to know if there is another legal ways through Play market
PackageManager.getInstallerPackageName() will give you the package name of the app which installed the app with the package name passed in as a String.
You're looking for Google Play Campaign Measurements
Google Play Campaign Measurement allows you to see which campaigns and
traffic sources are sending users to download your app from the Google
Play Store.
You can create multiple apk files, one for every distribution channel you have.
In your project, create a config.json which contains the information you want to know about the installation and current version of the installed apk file of your application. The contents of the file, varies based on the distribution channel. For example, for the version you want to upload to Google Play, it can contain :
{
"channel" : "google-play-store",
"campaign_name" : "fall 2016"
}
Now, when the user installs and runs your application for the first time, read this config.json and send this information to a remote webservice of your own, to collect statistics.

Java: Get USB Mass Storage Device Information

is there a possibility to get USB mass storage information like the serial of an USB device in Java on Windows?
I tried to achieve that with USB4Java (low and high-level API) and it works, but the problem is that I have to install a customized driver to get access to the information from my Java app (described in the FAQ at http://usb4java.org/). When that special driver (created with Zadig) is installed I don't have any further access to the device from the Windows explorer (just from my Java app).
I would like to detect when a new USB device is attached and if it was attached, I would like to get some information like the serial number of the device, the device name, the drive letter that was assigned etc.
That app should be used by other users and I couldn't force them to create a customized driver for each device ...
Do you have any hints how to achieve that?
Thanks.
Edit: Is it possible to get the usb-port of a connected device with Java-built-in methods?
I've tried sth with FileSystemView.getFileSystemView().getSystemDisplayName() but there are no such options. Is there another possibility to get vendor id's or sth. similiar with Java?
Or is it possible to get the drive letter with USB4Java?
Thanks.

Categories