- 35,489
- 11,524
- CPU
- Ryzen 7 5800x
- Dissipatore
- Deepcool gammax l240 v2
- Scheda Madre
- Aourus Gigabyte X-470 ultra gaming
- HDD
- Samsung Evo 850 250gb ,2tb x 2 toshiba P300, 256 Ssd silicon power, Samsung evo plus 1tb nvme
- RAM
- 32 gb G.Skill Tridentz 3200 mhz RGB
- GPU
- Zotac - RTX 3070 Ti Trinity OC
- Monitor
- ASUS TUF QHD 165hz IPS, ITEK GCF 165hz IPS QHD, Samsung Curvo 144hz QHD
- PSU
- Seasonic Focus 650w 80 platinum
- Case
- Coolermaster h500p
- Periferiche
- Asus Tuf Wireless
- Net
- Fibra Tim 100mb
- OS
- Windows 10 Pro 64 bit
Salve amici
sto seguendo questa guida:
https://developers.google.com/maps/docu ... o#overview
perchè avrei bisogno di tracciare gli hotspot tramite macaddress in java.
qui nella guida dice che l'api come richiesta vuole un argomento di questo tipo:
io mi chiedo come posso fare cio??
sto seguendo questo codice che però fa una cosa similare con quest api
https://developers.google.com/maps/docu ... ding/intro
il mio codice
come faccio per usarlo riaddattandolo alla mia ricerca e alla mia api??
sto seguendo questa guida:
https://developers.google.com/maps/docu ... o#overview
perchè avrei bisogno di tracciare gli hotspot tramite macaddress in java.
qui nella guida dice che l'api come richiesta vuole un argomento di questo tipo:
Codice:
{
"macAddress": "01:23:45:67:89:AB",
"signalStrength": -65,
"age": 0,
"channel": 11,
"signalToNoiseRatio": 40
}
io mi chiedo come posso fare cio??
sto seguendo questo codice che però fa una cosa similare con quest api
https://developers.google.com/maps/docu ... ding/intro
il mio codice
Codice:
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
public class JsonReader {
public static void main(String[] args) throws ParseException {
InputStream inputStream = null;
String json = "";
try {
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("https://maps.googleapis.com/maps/api/geocode/json?italy");
HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
inputStream = entity.getContent();
} catch(Exception e) {
}
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream,"utf-8"),8);
StringBuilder sbuild = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sbuild.append(line);
}
inputStream.close();
json = sbuild.toString();
} catch(Exception e) {
}
//now parse
JSONParser parser = new JSONParser();
Object obj = parser.parse(json);
JSONObject jb = (JSONObject) obj;
//now read
JSONArray jsonObject1 = (JSONArray) jb.get("results");
JSONObject jsonObject2 = (JSONObject)jsonObject1.get(0);
JSONObject jsonObject3 = (JSONObject)jsonObject2.get("geometry");
JSONObject location = (JSONObject) jsonObject3.get("location");
System.out.println( "Lat = "+location.get("lat"));
System.out.println( "Lng = "+location.get("lng"));
}
}
come faccio per usarlo riaddattandolo alla mia ricerca e alla mia api??