Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9030463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:29:51+00:00 2026-06-16T07:29:51+00:00

I need to be able to discover the services on the local network (so

  • 0

I need to be able to discover the services on the local network (so say I am running a chat application and I want to discover other devices on local network running this chat), but sadly I need to be able to use it on devices with API < 16 (so I cannot use android.net.nsd) I am sure this can be done without using NSD API. Question is how. Any help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:29:52+00:00Added an answer on June 16, 2026 at 7:29 am

    There are at least three or four options.

    You can use

    TCP or UDP

    1. Broadcast address
    2. Multicast address
    3. Iterate over all adresses in your network

    HTTP

    4 Make use of external server or something like GCM (Google Cloud Messaging)

    ad.1 and 2

    Pros:

    +Easy to implement, server is sending predefined “hello” message on broadcast/multicast address of your subnet/network on specific port, client is listening on that port and when “hello” message arrives, he automatically knows server IP address (contained in packet)

    +Connection to the Internet is not needed

    Cons:

    • Some public networks blocks this addresses to avoid attacks (e.g flooding ).

    ad 3.

    Pros:

    When Multicast and Broadcast is blocked what you can do is simply iterate over whole subnet. It is ” brute force ” method, but works, especially on typical home/small networks where mask is /24 – there are only 255 addresses to iterate through.

    Connection to the Internet also is not needed

    Cons

    When mask is let say /16 it will take pretty much time to iterate all IPs

    can cause battery drain

    and will flood network.

    ad. 4

    Another approach is to make some external server that will be “orientation point” for devices. Each of them sends up its own Address, and looks if there are some entries from another devices from the same network.

    Of course Internet connection is needed.

    So, I think it is good idea to start with broadcast and multicast since it is very simply and will work in many places, but keep in mind that there are networks where it is not allowed to use.

    Good reference can be found here http://docs.oracle.com/javase/tutorial/networking/datagrams/broadcasting.html

    You should also check this one http://home.heeere.com/tech-androidjmdns.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop some local network services using apache thrift. There should be
i have this multidimensional array in php and I need be able to access
Users of the website need to able to store images in their area ,
Need to be able to pull Magento products into an external template. Need to
I need to be able to access a list throughout my Rails project. For
I need to be able to search through multiple 2D arrays and search the
I need to be able to create an id for a hyperlink. I have
I need to be able to strip out a condition in a string, here
I need to be able do the following on a TR: onmouseover highlight the
I need to be able to map out in coordinates real world cities and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.