For a fest at my college, we are planning a quiz contest.
For the buzzer round, I was thinking of writing 2 app for android (we have a few handsets), one for the quiz master and the other for the contestants
The contestants will be connected to the quiz master through bluetooth.
After reading the question, the quiz-master clicks a button in his/her app, the button in the contestant apps will be enabled for X seconds. As soon as a contestant clicks his/her button, the quiz master's app will flash the name of that contestant.
My questions:
Is it even possible to have multiple connections and accept concurrent (or multiplexed) messages from them in bluetooth (something similar to select() in unix/c)?
If possible, where should I look for any examples? What kind of problems will I face trying to develop this (I know reliability is an issue here) and how to avoid them?
I had tried this on laptops before and failed. But maybe I gave-up very early. Please help.
EDIT:
I gave-up the project (too many connection drops). I'm keeping the question open though.
Bluetooth supports piconets, in which a single (quiz) master can communicate with up to 7 slaves.
So, at the Bluetooth level, this should be doable. I'm not the person to say if it's possible to implement using Android's Bluetooth API:s, though.
Have you read though this and the rest of the information available specifically for Android?
http://developer.android.com/guide/topics/wireless/bluetooth.html
Aside: When I was in college we did trivia nights the old fashioned way (paper and pencil) but on the plus side you didn't have to worry about having expensive phone handsets in the hands of drunken college students! ;-)
Related
First off - YES I KNOW that there are an incredible amount of "tutorials" on the internet as well as SO questions on the topic that this question is on as well. PLEASE understand.
I have an app, and am trying to add functionality to transfer data between two Android devices. The data is small, merely xy coordinates for a button-clicking game to make it multiplayer. I decided that Bluetooth is my best bet. HOWEVER, after spending about 3 hours reading the official docs, I am still stuck. All I need is to: 1. Connect to a chosen device 2. Send the data. Its mostly about "Bluetooth Servers" and stuff, but I need a quick connection, and the code to send the data. Everything I've seen requires a HUGE amount of code, and doesn't really solve my problem. If the amount of code is required, is there a library that can help me? NOTE: I have already seen these, this, and this. Generally, the code provided doesn't work, is too cluttered/unreadable, outdated, or not easily implementable in my app without a major re-config pain. I'm looking for a solution that is Up To Date and Working.
(I can also be convinced to use WiFi if thats a better path to go down :\ ).
I also need the code to be compatible between Android devices down to API 21.
Scenario:
User_1 opens game and clicks "Multiplayer Mode". Selects "Start as Host". Now a game is running, but not started.
User_2 opens game and clicks "Multiplayer Mode". Selects "Join Device" In the background, the app is connecting the devices together.
A default Android Dialog appears, and they select RANDOM_GAME_NAME device, and clicks "Join".
User_1 is informed of them joining the game.
Game starts. Both players have a "board" where they try to tap buttons. User_1 taps button_1. Game sends signal to User_2 device that button_1 has been tapped and is now untappable. And vice versa until all the buttons are tapped.
Only two players can play at a time.
I am currently trying to develop a mobile application for both iOS and Android. It basically will be a game buzzer app, determining which of the players is granted a right to answer a specific questions.
The problem is that I struggle to determine which technology / framework I should use for that. Now, some details:
In this app there will be a "base" - it is the phone that gives
"start" signal for all the other players. Each buzzer pressed before this signal corresponds to a false start. Eventually, information
about which player is granted a right to answer or is penalized due
to false start should be displayed on the base device.
App is done for people who have no access to the internet. All the
communication should exists given ONLY mobile phones with no data
plan.
Max number of communicating devices is 9 (1 base and 8 players)
I investigated a lot of resources and this is what I discovered:
Regular WLAN with TCP sockets and etc won't help, since it assumes that all devices are connected to same wireless access point - it violates my requirements.
Regular bluetooth won't help either. This would work across a specific platform, but making Android talk to iOS is impossible.
Situation with Wi-Fi direct is same as with regular bluetooth. Both platforms support this, but Apple's MultipeerConnectivity framework works only with iOS devices.
Now the last option I am left with is BLE. Both platforms support this and are able to intercommunicate (acting both as central or peripheral devices). However, due to my requirements for an app, I assume that base device should act as peripheral, and according to (sometimes conflicting) articles on Internet, one can't connect several central devices to single peripheral.
Now, my questions:
I still assume I might have done some mistakes in the bullet points above, so please, correct me if I am somewhere wrong.
Now when I am left only with BLE option, are there any possible solutions to the above issue? Maybe it is possible to use all devices as centrals (?). I recently saw this example, where everything works cool. Sorry in advance, if I said something stupid.
Of course, there is a counterexample - FireChat, which employs OpenGarden's MeshKit. But the framework is not available. I tried communicating OpenGarden people, but no response. Does anyone know if it is planned to go opensource soon, or maybe there exists any analog of this?
Try the Hype SDK by Hype Labs. It's a multi-transport, multi-hop mesh SDK. It supports interoperable Bluetooth Low Energy (and other transports as well). The SDK is currently in private beta but will be made available upon approval of the subscription.
I would like to do an Android app (not for an assignment. It is a community event and I volunteered to make this app) that can send messages to peers using wifi-direct.
Basically, each phone running the app acts as a jeopardy buzzer. When a person presses the "answer" button, it disables the buttons on other people's phones (who are physically in the same room). When a question is over, all the phones have enabled "answer" buttons and so on.
I found this link below that shows how to create an app that uses wifi-direct.
http://www.mediafire.com/download/f022u9hghja7cvs/WifiDirectDemo.zip
so the question is: how do I get phones to communicate with one another through my app? Assuming their phones have wifi-direct capability, how does one phone send a message/data to other phones so that their 'answer' buttons get disabled/enabled.
I am fairly new to Android development. I have 2 days of experience with it so any kind of guidance would be useful. Thank You!
My company is looking at developing a mobile(Tablet) app that will need to connect to various sensors made by others using Bluetooth. These other companies have their own apps to connect with their individual sensors.
I need my app to be able to connect to their hardware (sensors).
Working with each manufacturer... What is the best way for their development teams to offer what I need without giving away all their code? In almost all cases their current sensor and app provide many more features than what we need.
Is there some middle ground where we ask only for the portions of code to perform the couple of functions we need?
Should they even be concerned about sharing their Bluetooth App code when they are the manufacturer of the sensor itself? Our app is only used to talk to their device which still needs to be purchased from them.
It's going to depend on their business model. Just ask. If they are willing to open up their peripheral, they will provide you with the API. Some might charge you for the "SDK".
You may be able to become a vendor and sign some contracts to ensure that they will continue providing the peripherals and support for them to some degree.
If they say no, it's generally not a good idea to reverse engineer it outside of hobby work. If they change their API, you'll have to change the app, and maybe they'll change it just to make your app stop working.
They can't really limit what devices can connect to it, but knowing how to communicate with the peripheral and having any credentials that it might ask for, is a different matter.
I was reading following article and I come up to know about RF(Radio frequency) signals are the medium of communication between connect mobile phone calls.
Idea came in my mind to have android app kind of RF scanner which secretly eavesdrop on mobile phone conversations around you.
I know i need more research but i quickly want to know if it is possible with android apps or not ?
enter link description here
Android does not offer APIs to do this. They are buried in radio kernel, which comes from pphone vendor. So answer is negative. It is possible but not with android.
PS: COTS solutions doing this are usually restricted in export and pretty expensive.
Honestly I don't see why this would be impossible. The pitfall of building an app like this would be:
a. user will most likely need a rooted phone and some kind of custom radio with their kernel. This shouldn't be a huge issue though as most users looking for something like this should have the know how to root their phone.
b. you wouldn't be able to release this on the market. as soon as google caught wind of such a malicious app they would remove it immediately.
Catching the signal of other conversation is not enough, cause signal is at least encrypted!