My application should stream voice from one device to all the other devices on the network (similar to PTT. only 1 device steams to the other devices)
Assumptions:
1. The speaker can be either Android or iPhone.
2. The network does not support multicast.
3. All the devices are connected a local router (no internet in the environment).
4. The maximum amount of devices is 40.
How should I implement this feature? Is there an open-source SDK for this? Is there a non-free SKD for this?
Maybe WebRTC can solve your problem. Check it out https://webrtc.org/
Tokbox
yes, here's the best one out there that i've used extensively, not only for audio chat but also video and more, it works perfectly with IOS if you know what you're doing
https://tokbox.com
Related
I'm using libVLC in my Android app to stream video over rtsp from the camera that I'm connected to over WiFi.
In general, streaming works fine, but there seems to be streaming problem if I'm connected do the camera by WiFi (that provides no internet) and also have got mobile data turned on. I use bindProcessToNetwork to make sure that the streaming is done via my WiFi network. On some devices (like Huawei Mate 10 with Android 9) the streaming works ok (it seems to use WiFi and ignore having mobile data on), but on other devices (like Samsung Note 10 with Android 10) when I use new networking API it seems that VLC is trying to connect via the mobile data, and only after some time when it fails it decides to use my camera's WiFi (despite the fact that I used bindProcessToNetwork).
I get an error log
VLC-std: Unable to determine our source address: This computer has an invalid IP address: 0.0.0.0
Suprisingly, it works fine if I connect to my WiFi from the system settings...
I found some comments that media streaming is done in a separate process, and it ignores calling to bindProcessToNetwork but on some devices (and Android versions) is seems to work and on others it does not.
I already asked this question on the Videolan forum, but with no luck.
Is there a way to force libVLC to stream using a specified network?
I don't think LibVLC can do this, and it's a bit out of scope of a multimedia framework.
I would handle this on the app side if I were you, using something like How do I connect to a specific Wi-Fi network in Android programmatically?
I am trying to figure out how to make game which will work only locally using Wifi Direct without any internet access.
The concept is very simple. It will be some kind of presentation so I need to have one master/host device and other connected devices will be slaves/clients. When I press button on master/host than should be changed only one value (string or int) in all slaves/clients devices.
With support of 20-40 connected devices in same time.
I have Tried:
UNet - it works only if it is connected to some router with use of local IP's but it does not support Wifi direct communication.
I have tried to find some plugins but I cannot decide which to choose or get information about support of Wifi direct.
I tried to find some other solution like Bluetooth but it supports only 4-13 connected devices at same time but I need to he connected around 20-40 devices in same time.
List of plugins I have found:
Forge Networking - https://www.assetstore.unity3d.com/en/#!/content/38344
1.1 I do not know if this supports a feature i required.
WifiDirect Plugin - https://www.assetstore.unity3d.com/en/#!/content/50112
2.1. This plugins have errors and have no support.
What I would like to ask about:
Does 1. plugin support Wifi direct?
Do you think That I should buy 2. plugin and try to fix it and hopefully I can find a problem and it will work?
Do you know some better or "any" solution how to solve this problem?
I am interested in any tips and help how to make it work.
Thank you very much for your help!
Jakub Kučera
After research I have realised a working solution!
Unity Asset Store: https://www.assetstore.unity3d.com/kr/#!/content/53955
Video of usage: Video
Plugin I have tested on a few Android devices and it works for Wifi Direct with no connection to internet.
This plugin supports much more than that for example:
TCP
Client / Server
Complete C# 2.0 native
Stand alone library (DLL)
Multi-Thread
Event Driven
Support [Binary/Json] message data
Log Server & MySQL Sample Code
New Feature
Unreliable UDP
MNF Server based WinFrom without MySql
I hope it helps somebody else!
And I would like to say thanks to author and his support!
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
Basically I want to make the tizen smartwatch into a bluetooth headset for a period of time. We have a tizen and an android developer handy and we're willing to build anything necessary to make this work.
This kind of process seems to work with built-in android applications like the standard phone app. But there doesn't seem to be any documentation online as to how an app developer would leverage streaming the mic.
It should be noted that we do need to get the audio into the microphone input on the phone for our third party software to work. It's not as simple as just getting the audio to the phone.
Any help, even someone telling us what isn't possible, will be greatly appreciated.
It is possible to play sound with the HTML audio tag: http://developer.samsung.com/forum/board/thread/view.do?boardName=SDK&messageId=269002&startId=zzzzz~&searchSubId=0000000032&searchType=ALL&searchText=sound
It is possible to capture the sound in a Host Android application
It is possible to exchange data bytes by bluetooth with the accessory SDK: http://developer.samsung.com/samsung-mobile#accessory
The data transfer is quick and efficient, so low quality sound may works with little delay
So it certainly is possible. But you'll have to code (or use compatible javascript and android libraries) all the streaming code which is quite a lot of work
I've been reading up on how to transfer data between iOS devices over Bluetooth using GameKit. I'm not writing a game, per se, but do have a need to transfer a small amount of binary data between two devices. Between two iOS devices, this is easy enough. However, I was wondering if it is possible to transfer data between an iOS device and an Android device via the same mechanism.
Has anyone come across documentation/tutorial that would explain how to do this? Is it even technically possible? Or has Apple put in some sort of restriction that would prevent this?
The other option I discovered was Bonjour over Bluetooth. Would this be a more suitable option for this type of operation?
This question has been asked many times on this site and the definitive answer is: NO, you can't connect an Android phone to an iPhone over Bluetooth, and YES Apple has restrictions that prevent this.
Some possible alternatives:
Bonjour over WiFi, as you mentioned. However, I couldn't find a comprehensive tutorial for it.
Some internet based sync service, like Dropbox, Google Drive, Amazon S3. These usually have libraries for several platforms.
Direct TCP/IP communication over sockets. (How to write a small (socket) server in iOS)
Bluetooth Low Energy will be possible once the issues on the Android side are solved (Communicating between iOS and Android with Bluetooth LE)
Coolest alternative: use the Bump API. It has iOS and Android support and really easy to integrate. For small payloads this can be the most convenient solution.
Details on why you can't connect an arbitrary device to the iPhone. iOS allows only some bluetooth profiles to be used without the Made For iPhone (MFi) certification (HPF, A2DP, MAP...). The Serial Port Profile that you would require to implement the communication is bound to MFi membership. Membership to this program provides you to the MFi authentication module that has to be added to your hardware and takes care of authenticating the device towards the iPhone. Android phones don't have this module, so even though the physical connection may be possible to build up, the authentication step will fail. iPhone to iPhone communication is possible as both ends are able to authenticate themselves.
Maybe a bit delayed, but technologies have evolved since so there is certainly new info around which draws fresh light on the matter...
As iOS has yet to open up an API for WiFi Direct and Multipeer Connectivity is iOS only, I believe the best way to approach this is to use BLE, which is supported by both platforms (some better than others).
On iOS a device can act both as a BLE Central and BLE Peripheral at the same time, on Android the situation is more complex as not all devices support the BLE Peripheral state. Also the Android BLE stack is very unstable (to date).
If your use case is feature driven, I would suggest to look at Frameworks and Libraries that can achieve cross platform communication for you, without you needing to build it up from scratch.
For example: http://p2pkit.io or google nearby
Disclaimer: I work for Uepaa, developing p2pkit.io for Android and iOS.
You could use p2pkit, or the free solution it was based on: https://github.com/GitGarage. Doesn't work very well, and its a fixer-upper for sure, but its, well, free. Works for small amounts of data transfer right now.