Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

321
Vistas
Cualquier forma sencilla de obtener el nombre SSID (nombre de conexión wi-fi) de la página HTML para Android e IOS

Necesito obtener el nombre SSID en una sola página html. Necesito usar para iniciar sesión, si la persona está presente en algún lugar conectado a cierta red WI-FI.

Entonces necesito una forma muy simple de obtener el nombre SSID actual de la conexión. Tengo algunos intentos con window.navigator.connection El siguiente ejemplo que uso para averiguar si la conexión es WI-FI o celular y funciona:

 var connection = window.navigator.connection || window.navigator.mozConnection || null; if (connection === null) { document.getElementById('ni-unsupported').classList.remove('hidden'); } else if ('metered' in connection) { document.getElementById('nio-supported').classList.remove('hidden'); [].slice.call(document.getElementsByClassName('old-api')).forEach(function(element) { element.classList.remove('hidden'); }); var bandwidthValue = document.getElementById('b-value'); var meteredValue = document.getElementById('m-value'); connection.addEventListener('change', function(event) { bandwidthValue.innerHTML = connection.bandwidth; meteredValue.innerHTML = (connection.metered ? '' : 'not ') + 'metered'; }); connection.dispatchEvent(new Event('change')); } else { var typeValue = document.getElementById('t-value'); [].slice.call(document.getElementsByClassName('new-api')).forEach(function(element) { element.classList.remove('hidden'); }); connection.addEventListener('typechange', function(event) { typeValue.innerHTML = connection.type; }); connection.dispatchEvent(new Event('typechange')); }

Así que me pregunto si puedo usar window.navigator.connection para obtener el nombre SSID o cualquier otra forma simple

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

La solución para mi problema podría ser recuperar una dirección IP por nombre SSID, si el usuario está conectado a la red wifi. Porque necesito verificar su presencia en algún lugar determinado, así que sabría el nombre de la red WI-FI (SSID). Entonces, si el resultado es alguna dirección IP, significaría que la persona está presente en ese lugar. Pero necesitaré una dirección IP de WI-FI privada (local), no una pública. Entonces, si pudiera tener alguna forma de hacerlo, será lo suficientemente bueno. Encontré algo en https://docs.oracle.com/javase/tutorial/networking/nifs/retrieving.html

The NetworkInterface class y obtener la interfaz por nombre getByName() :

 import java.net.*; import java.util.*; import static java.lang.System.out; public class ListNIFs { public static void main(String args[]) throws SocketException { Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces(); for (NetworkInterface netIf : Collections.list(nets)) { out.printf("Display name: %s\n", netIf.getDisplayName()); out.printf("Name: %s\n", netIf.getName()); displaySubInterfaces(netIf); out.printf("\n"); } } static void displaySubInterfaces(NetworkInterface netIf) throws SocketException { Enumeration<NetworkInterface> subIfs = netIf.getSubInterfaces(); for (NetworkInterface subIf : Collections.list(subIfs)) { out.printf("\tSub Interface Display name: %s\n", subIf.getDisplayName()); out.printf("\tSub Interface Name: %s\n", subIf.getName()); } } }``` So I wonder can I use this in single HTML page and how to do it if it is possible. Or any other suggestion
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda