"Fatal error: Call to undefined function" is always a sign of an incomplete upgrade, where not all the files got upgraded.
Do a manual upgrade.
WifiManager myWifiMananger = (WifiManager) getSystemService(WIFI_SERVICE); WifiInfo myNetInfo = myWifiMananger.getConnectionInfo(); showIp.append(changeIp(myNetInfo.getIpAddress()) + " \n"); showIp.append(myNetInfo.getSSID() + " "); List<ScanResult> scanList = myWifiMananger.getScanResults(); for(ScanResult element : scanList){ showIp.append(element.SSID + " Level: " + element.level + " freq : " + element.frequency + " Cap: " + element.capabilities + "\n"); } //DONT forget that the getIpAddress returns an int value. Convert it to string : public String changeIp(int ipAddress){ return String.format("%d.%d.%d.%d", (ipAddress & 0xff), (ipAddress >> 8 & 0xff), (ipAddress >> 16 & 0xff), (ipAddress >> 24 & 0xff)); }
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
// Add an item to the start of the list cb.insertItemAt("item0", 0); // Add an item after the first item cb.insertItemAt("item0.5", 1); // Add an item to the end of the list cb.addItem("item3"); // Remove first item cb.removeItemAt(0); // Remove the last item cb.removeItemAt(cb.getItemCount()-1); // Remove all items cb.removeAllItems();
protected void list() { // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration portList = CommPortIdentifier.getPortIdentifiers(); // Process the list. while (portList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) portList.nextElement(); System.out.print("Port " + cpi.getName() + " "); if (cpi.getPortType() == CommPortIdentifier.PORT_SERIAL) { System.out.println("is a Serial Port: " + cpi); } else if (cpi.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("is a Parallel Port: " + cpi); } else { System.out.println("is an Unknown Port: " + cpi); } } }
Source : java2s.com, modified as javax.comm does not exist anymore on Windows and RxTx should be used
<"border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%>
Some code here