0

I have an Android app that connects to the network of a device and sends a command through the device's IP to scan networks that the device finds.

My command is "new Command(). Execute (" http://192.168.4.1/scan ");

I'm new in Android and with String split I get this: imgur.com/gJdy2JV

But now I'm stucked and I don't know how to advance and get just Headquarters and 72% to show in a list on screen.

I want to make a list with each SSID and the percentage (%) of the signal for the user to select and then create a new string with the SSID selected, then the user puts his password.

How do I separate strings from SSIDs and signals to create a list?

***IMPORTANT: The word SSID and the word Signal should not appear in the list.

  • Maybe use `String.split`: https://stackoverflow.com/questions/3481828/how-to-split-a-string-in-java - you can separate string into strings table by keyword, or even regex – thorin86 Jul 19 '17 at 19:23
  • I tried, but have many SSID: "text", how can I get each of them? – Carlos Ughini Jul 19 '17 at 19:25
  • After splitting by `SSID:` you will get table of strings with 4 elements in it. Then iterate over it again and then you can use regex to get separate SIGNAL, AUTH etc. – thorin86 Jul 19 '17 at 19:30
  • Ok, but I'm new in Android and I don't know how to use regex. With your first tip I get this: http://imgur.com/gJdy2JV But now I'm stucked and I don't know how to advance and get just Headquarters and 72% to show in a list on screen. – Carlos Ughini Jul 20 '17 at 13:05

0 Answers0