How to obtain the MC40 IP address

R Robert Rapp 3 years 6 months ago
1 1 0

We are using the SB1's and MC40's in all of our stores. I wrote a script for the SB1 to get the IP address of the unit and build a store specific ip address to connect to our stores back office using function:  signal.signalEvent = "signalEvent(%json)"; in asl.js.
I can't find this function in ebapi-modules.js. Do you have a comparable function for the MC40?

Please Register or Login to post a reply

1 Replies

E Efkan YILMAZ

Robert, the Android Java API's provide a method to get a devices IP address through WifiManager.

WifiManager wm = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wm.getConnectionInfo();
int ipAddress = info.getIpAddress();
String MyIPAddress = String.format("%d.%d.%d.%d", (ipAddress & 0xff),(ipAddress >> 8 & 0xff), (ipAddress >> 16 & 0xff),(ipAddress >> 24 & 0xff));

CONTACT
Can’t find what you’re looking for?