Questions tagged [android-nsd]

Android Network Service Discovery (NSD) allows an application to seek out a nearby device running services with which it can communicate.

12 questions
20
votes
2 answers

Android Network Service Discovery "timeout"?

I'm using Network Service Discover (NSD) on Android to advertise a REST server on the device. My REST server is wrapped in an instance of android.app.Service. In the onCreate, I successfully start the REST server and register my NSD service. I can…
Kerry
  • 387
  • 1
  • 8
19
votes
2 answers

Android - jmdns doesn't discover devices

I'm trying to implement a class to discover services on the network. I've tried working with Android's NSD and it does discover the services fine, but it supports only API levels 16 and up, and I can't seem to retrieve the txtRecord field within the…
orenk86
  • 720
  • 9
  • 24
17
votes
2 answers

NsdManager doesn't stop service discovery

In Android app that I'm currently developing, I want to connect do zero-config networks using NsdManager. I managed to run network service discovery and connect to the desired network, but after stopping discovery NsdManager thread is still…
7
votes
1 answer

Nsd Manager Android Crashing on 4.2.2

Discovering services results in a system crash. The type of discover I am trying is "_http._tcp." Here's the log. D/NsdService(13310): Discover services E/AndroidRuntime(13310): *** FATAL EXCEPTION IN SYSTEM PROCESS:…
Kumar Bibek
  • 9,016
  • 2
  • 39
  • 68
6
votes
2 answers

Android : Stopping a Bonjour service left running after the parent process quit abrubtly

My app is essentially a background service that needs to occasionally register an NSD service (Bonjour service) for the purpose of enabling discovery of a socket server run by the main background service (aka run by the app). If I am reading the…
Hugo
  • 974
  • 9
  • 21
4
votes
0 answers

NSD Device Lost Message Not Received on Disabling Wifi

I have written a sample app using NSD as explained here. The app works fine, it discovers services, resolve services and also report services lost if that service is unregistered. But in a user scenario like: If NSD app is running on a device…
Nargis
  • 4,687
  • 1
  • 28
  • 45
3
votes
1 answer

Unable to register NSD Service

I am trying to work with NSD and I find myself stuck at the very begining.. I set up a very basic layout with a single big button. This button's purpose is to start and register a service on my device so other devices would be able to connect to it…
2
votes
0 answers

How to discover network services on domain other than .local domain in Android?

I want to use Android Network Service Discovery (NSD) function to discover some local network services advertised on local domain. I read the official documentation on Android website about Android NSD. I can find the network services advertised on…
tonga
  • 11,749
  • 25
  • 75
  • 96
2
votes
1 answer

getSystemService(Context.NSD_SERVICE) freezes the 5.0 emulator

Trying to execute the following line NsdManager Mgr = (NsdManager)Ctxt.getSystemService(Context.NSD_SERVICE); in the Android 5.0 emulator (ARMv7a, on Win64) freezes the emulator. The debugger never reaches the next line, the emulator doesn't…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
1
vote
1 answer

Connect Android devices

I would like to know if there is any way to connect few android phones together? For example, one phone acts as the host and the rest connect to it? I'm planning to make a game, but I need some connection like this (without Internet…
E Heng
  • 91
  • 3
  • 9
1
vote
2 answers

Discover button IllegalStateException: Could not execute method of the activity

Link to the 3 java files: https://www.dropbox.com/s/f57xwvm3gu9eubm/macnetworknotify.rar?dl=0 I am trying to execute this application example found at http://developer.android.com/training/connect-devices-wirelessly/nsd.html#discover about NSD. When…
MOTIVECODEX
  • 2,624
  • 14
  • 43
  • 78
0
votes
1 answer

NSDs Service is not being unregistered properly

A bit of a background of the question. I'm making a multiplayer game that uses Network service discovery to broadcast a service. Though I'm neither begginner in java nor in android, I AM a begginner in technologies that use Wi-Fi to connect devices.…
Sergey Maslov
  • 758
  • 1
  • 8
  • 22