I need to find if there is a laptop running on the same network as my Android device. Something similar to Android's native NsdManager, but as I understand it, NsdManager only detects devices that are running a particular service, so it can only detect other Android devices.
Is there a way to "find" a laptop in the same wireless network? The problem is, I won't know the specific IP address of the laptop, as I would prefer my application to be able to search for the laptops by itself in order to sweeten the UI experience.
Related
at the moment I'm planning to build an cross-plattform app (iOS/android) that streams music from one device to others without internet. Now I'm considering which network technology is best for this use case. By the way I'm sorry I didn't say hello to you, it disappears all the time.
Existing wifi network:
I don't wanna use this because I want my app to work everywhere.
Wifi-Direct:
Not supported by iOS (tell me if I'm wrong).
Bluetooth:
Here I've found kind of conflicting information.
Bluetooth 2.1 is supported by both iOS and android but iOS has its own protocols and doesn't support the common ones.
Bluetooth Low Energy provides a data rate that is too slow for high quality music streaming (1Mbit) and is supported by iOS but on the android side version 4.3 is required which suspends about half of all users.
What I'm not sure about is the "normal" (not LE) usage of Bluetooth 4.0. Does anyone have experience/information about this?
Creating a wifi hotspot:
This was my first idea and probably it's the best. But there are several issue:
Some carriers do not allow hotspots
It's not possible to create a hotspot without cell reception on the iPhone and some (I don't know which exactly) android devices.
It's not possible to create a hotspot without cellular data activated on an iPhone; I don't know what about android devices (Nexus 4: no problem, SGS3 mini: cellular data can be switched off after creating the hotspot)
-> that's a problem for those who don't have an internet unlimited plan or for those who don't want to share their internet connection (as this dissipates the high speed volume) but see the next point for that.
In order that everyone can use his own cellular data connection the wifi settings can be manually edited on iOS (remove router, DNS and search domains entries). Is there a way to do so on android as well? Is there way to automize this process?
https://apple.stackexchange.com/questions/173894/can-i-connect-to-wifi-but-still-use-cellular
Is there any way to create a wifi network programmatically (not just enable the normal wifi hotspot)?
SDKs/Frameworks like Open Garden or Alljyon looked promising at the beginning but:
Firechat (which is made by the Open Garden team) promises that iOS and android devices can chat locally without existing network but actually it didn't work for me with an iPhone 6 and SGS3 mini. However they don't want to publish their SDK. The only information I got is that it works over wifi-direct and bluetooth. If anyone has an idea how this could work, please tell me.
Alljoyn does not provide direct communications between iOS and android without an existing network. (Tell me if I'm wrong)
API's:
iOS multipeer connectivity does not support android
I hope anyone can help me.
Regards Nils
If you are talking about a TVBOX device with Android, you will need the ethernet cable connected in order to create a hotspot.
Another option that I have done is:
Create a service that runs on iPhone with an interfaz, do whatever you want on that interfaz, then send what ever you need to a webservice, then in Android, just pull that info from another App as a service, or just store it in an internal sqlite.
Good luck
I'm trying to use two phones in my car as a reversing camera: one being the camera and the other being the viewer. I have the software but the problem is I can't get it to work using two phones. I can get it to work using a third phone as the hotspot gateway. The problem seems to be I can't seem to communicate with any app running on the device running the hotspot yet they all have the same ip range. One machine is running a http server accessing the camera (similar to "IP webcam" app) and one is running software accessing the web server (in this case a web browser). There is no internet component. I assume this is being blocked because of some sort of security feature. I see no technical reason why it can't work.
I have tested this using HTC one, HTC DesireHD, Samsung galaxy camera and other various friend's phones so it seems to be consistent across android. Not an odd feature of some type of phone. Android 5 has not helped either. If it is a security feature do I need to root the device running the hotspot to overcome it? Any pointers to discussions on this subject would be very helpful.
I have searched many similar threads but most are discussing tethering issues or connecting through to the internet. Not sure what keywords to use. I have also tried "Hotspot control" app which did not work although I don't think it relates to this issue.
e.g How to make two android devices to communicate through TCP This has the right title but then goes on about NAT translation which is not related. Others go on about DNS. Just a simple DHCP server (which the hotspot has) and a router?
So in essence this is simply getting a local tcp/ip network set up between two android devices so apps can talk to each other. I would have thought this was quite straight forward. Hotspot is almost there as a solution.
I had a brainwave and solved my own problem at least on my HTC one (and I think before the 5.01 upgrade which would have been kitkat).
When in "settings" select "more" under "Wirelesss Networks".
Then under "Mobile network sharing"->"Portable Wifi Hotspot" click the menu button at the top and select "Advanced".
Then click LAN Settings:
Here we select the ip address of the host (i.e this mobile) and the "Starting IP" for the DHCP server for devices connecting in. It seems to choose zero (last in group of 4 numbers used for the ip address) for the mobile running the hotpsot and and then, presumably, 10 for the starting address of connecting machines. However, it seems only addresses from starting address onwards can see each other so the simple fix is to change the ip address of the host to a number greater than 10. I chose 200 and all worked. My camera can connect to the phone and the two can talk.
However, on my Galaxy camera (model EK-GC100) running 4.1.2 (Jelly Bean) these addresses can't be configured. It also doesn't allow a hotspot to start if a sim card isn't inserted. It seems to think there is no other reason to use a hot spot other than for tethering. Just another in the list short sighted design features that cost almost nothing to implement.
Unfortunately it would have been better if the camera device is running the hotspot. Oh well not a major issue as I wouldn't use a galaxy camera for a car reversing camera.
I am currently trying to write an android App that is connected to a application running on a pc (even though windows is preferred linux would be ok, too) via either USB or Bluetooth. Right now I'm not really sure how far this is possible. As far as I understand the USB Android API, I can not really use USB to talk to another application. Only raw file exchange seems to be possible. The Bluetooth idea seems a lot more feasible as I see it. I'd write a bluetooth server for the PC and connect to it via a Bluetooth client written via Android API. Point is, is that possible with windows? Has anyone seen any examples for what I am looking for? All I can find for USB is teethering which is not what I want.
There are android applications which allow you to use your mobile's touchscreen act like a touch pad which can be used to control your pc or laptop via bluetooth or wifi connection just like you are using your laptop's touch pad. PremoteDroid, RemoteDroid, Gmote etc.. to name a few (or only these are available i guess!).
But to do so you also need to develop a server application which will run on the device you wish to control and help u make connection between your mobile and the device. I have used PremoteDroid and RemoteDroid and they both work well on my laptop which runs windows 7. You can even add keyboard functionality.
PremoteDroid is openly available here: http://code.google.com/p/premotedroid/
I have a Bluetooth server application on my Mac that I use to test an Android app I'm writing. The app will eventually be used to communicate with a device with a microcontroller and bluetooth modem, but I needed a way to test the app in the absence of that device. The server app is written in Java, so I think it should work on a PC (and almost certainly in Linux).
I'm happy to share the code with you--I found it somewhere on the Internet (though I can't seem to figure out where now) and modified it as I needed to. It uses the BlueCove library, and is only about 60 lines, including several imports (and the code I commented out but didn't bother deleting :). I also have a Bluetooth client program on my Mac, since my app also has server functionality.
I have never tried to do anything like this using USB.
I'll explain the problem I'm trying to solve first. I have two Adobe AIR applications that can be deployed to Android (Receiver App and Broadcaster App). The Receiver App sits on one Android device and waits for any Android devices running the Broadcaster App (on the local network). This is all currently working and I can have the devices talking over a local WiFi connection with no problem.
The issue is I need to be able to do this without an external router/AP. I was able to setup a third Android device as a Wireless AP and have two other Android devices communicate over the WiFi connection just fine. However, the device setting up the Wireless AP connection is not able to join the network.
After searching google and stackoverflow I came up with a few solutions.
(1) Set up an Ad-Hoc network using a rooted Android device and running Barnacle. I was able to try this and set up an Ad-Hoc network successfully between two devices but they were not able to establish a connection in the Adobe AIR apps (using Adobe P2P support).
(2) If I can get my hands on the new Android 4.0 Galaxy Nexus I understand I'll have access to WiFi-Direct. I'm curious if this will solve my problem. Can I set up AND join a Wireless AP using the Galaxy Nexus, and connect to the Wireless AP from my older 2.X devices? Reading this makes me believe I can, but I wanted to know if anyone can confirm.
P.S. I am using NetConnection/NetGroup/NetStreams on the Adobe AIR side over a serverless rtmfp connection.
Thanks.
Sean, this may not answer your question, but I've used rtmfp for serverless p2p also (of the kind described in this blogpost by Tom Krcha) and have a couple data points for you:
Many HTC devices and other smartphones have a multicast issue that prevents them from communicating in this way. Google 'htc multicast' and read about it on this blog. Interestingly, these devices can work in such a group as long as there are non-impaired devices also, because they can transmit multicast, just not receive it. So the other devices initiate the group and all can participate. But the impaired devices can't initiate the group by themselves.
I had no trouble communicating between a range of devices, from Android to iOS to desktop, so I assume you should be fine across versions of Android.
I have a rooted phone that I run an app called 'wireless tether' to create a hotspot / wifi access point, and when two other devices connect to that hotspot, they can communicate with each other using this method, but they cannot communicate with the phone that is creating the hotspot network.
I have been researching the Samsung Galaxy Prevail for Android development. This phone is meant to be used on the Boost network.
Will the phone be usable as a test device if it is never activated on the carrier's network? Will the device be able to connect to the internet through WiFi if it is never activated?
What is to stop someone from buying the device and using it as a glorified MP3 player?
http://reviews.cnet.com/smartphones/samsung-galaxy-prevail-boost/4505-6452_7-34629355.html#reviewPage1
http://www.amazon.com/Boost-Mobile-BMSAMM820/dp/B004Z7HYUI/ref=sr_1_1?ie=UTF8&qid=1312915398&sr=8-1
Will the phone be usable as a test device if it is never activated on
the carrier's network?
Yes. I have a Nexus S that's never been activated which I use for development.
Will the device be able to connect to the internet through WiFi if it
is never activated?
Yes.
What is to stop someone from buying the device and using it as a
glorified MP3 player?
Nothing, really.
Edit: If you're simply looking for a real phone to develop on, you might want to scrounge around on eBay and look for people who have upgraded, and no longer need their phones. As long as they have been cleanly removed from the carrier's network, they should work just fine. Could be a good way to pick up a cheap phone.