I've been trying to build an app for several weeks already, but it's taking me nowhere and I feel that I'm wasting my time so I come here to ask for your help.
The application should do this:
Connect Phone A to Phone B using bluetooth
The 2 phones should be able to send messages to each other
If not within range, save the message and hold it until the other phone is within range.
I've read a lot about this subject and I think I'm going to use the BluetoothChat sample and modify it so it can do what I want.
I wonder if such an app is possible and how can I approach it using the BluetoothChat sample code?
Related
I'm completely new to the arduino controlling and programming.
I want to get signal my android smartphone , When a call receive to smartphone I want to acknowledge my Arduino uno board by blinking a LED.
Then if I want to take a call using a physical button I have to answer the call or reject it.
Simply I want to send digital signals from my smartphone to Arduino board and I want to receive the analog button press as response to the phone call(Whether answer/ignore)
I connect phone and Arduino via Bluetooth
This is the Where I have struggling right now.
I need some help on this please!!
It just so happens that I wrote an answer that fits this question a couple of days ago here, this is an edited version of it:
You'll have to buy a module to allow the Arduio to communicate via bluetooth. An example of such a module is the HTC-06, wich can be bought online for less then $10 and for which there is an exellent tutorial over at instructables.
The phone side of the story is explained here, in the official Android documentation. It is sometimes convenient to test with a terminal on your phone, I used this one.
I have some code laying around that can send some data between the Arduino and my phone, I can post it later today if you'd like that.
Alternatively, if you don't want to write everyting yourself, you can use an app like Tinkernut does is one of his videos.
I want to develop an android application for LAN calling.My app resembles apps like whatsapp, viber etc, so I googled for the same. What I got from different answer is:
Whenever we install whatsapp, the whatsapp server register our number and contact list. The app continuously pings the server and update its status on server.
When we open the app, it gets the data from server, and if a number is found in contact list, it displays the status of the number and other things.
Whenever we message some one, the message goes to server and stays there until delivered successfully.
For my app the two steps are:
Find all the devices which has my app, their IP and mac address.
When devices are found,allow calling between them.
For step 1, I have two options:
As whatsapp, I can have a server. It registers the info of the mobile phone, whenever the app is installed. The app pings the server and shows its status.
I can use my own network device discovery code. This code scans the network and find the devices.
This step is costly, whole network is flooded with the packets. And also it is quite difficult to write network device discovery code.
For step two, I want to implement client-socket programming and simply connect the microphone of one device to the speaker of another phone. I think it is challenging, but it is possible.
Please help me with network discovery code or the server setup. I am quite familiar with android development, but very novice to networking.
Also how calling is done between these devices?
I have searched for the answer and found the following links: Peer-to-peer SIP call with Android SIP Stack?
how to implement voip in android
VOIP on Android libraries or sample code
I also put a question on quora:
https://www.quora.com/How-can-I-develop-an-app-having-feature-like-whatsapp-calling-in-android
But, still I am stuck at the beginning. Please help me with it.
Not a complete answer yet, but here are the things to look for:
Assuming Java is your language, use Multicast Network discovery in Java using multicasting and https://en.wikipedia.org/wiki/IP_multicast
Calling needs more description. Does the call starts immediately (as soon as the peers detect one-another) ? How does one know the identity information - a number or a username etc. ?
I am building a small robot that I can drive around outside of bluetooth range -- so I want to send signals via the internet. The eyes and ears are an old Droid phone (running android 2.2.3). I can get the phone to talk to a bluetooth module to control the robot (tap the left button, it sends the letter L to the bluetooth, which turns the robot etc etc). I have got Skype or Tango to both give me video and sound to a pc, so that problem is sorted. The thing I cannot solve is how to send e.g. the letter L over the internet and for the phone to know what I sent. I wrote an app that checks the contents of a WebDB every second (it works), but that app stops running when I power up the video chat application. So the question is...how can I get my old Android phone to know that someone via the internet has sent the letter L via Skype or some other way, and for that to happen while I'm also running a video chat application? PS...my phone has no number, no carrier, and can't receive sms messages or calls.
You wrote:
I wrote an app that checks the contents of a WebDB every second (it works), but that app stops running when I power up the video chat application.
So the answer is simple. Write an Android Service that runs on the background and polling the internet. Read about android service, and you can see a real example in the ApiDemos. Good luck!
Im a little new to the android development, I believe I have the basics down but I am wondering the best way to communicate between two phones running the same app. I am looking for something that would be close to instant. For an example, if you sent a message or somekind of variable or string it would appear on the other phones app providing the app was open on both phones. Would be great if I could be pointed in the correct direction here, Thank you!
Assuming you have access to a server that both devices can connect to, the best way to handle this is to set up a socket and have both devices connect to it. That way the messages can be send back and forth and be pushed through immediately (rather than the devices polling for any new thing to do intermittently).
You can learn more about using sockets on android here: http://developer.android.com/reference/java/net/Socket.html
If you're unfamiliar with how to write a server socket, you can write something that works somewhat similarly with a system that just has each device leave a message and have the other device come looking for it, but as I said, that is much less "real time" since then you have to have the devices constantly pestering the server to see if there's anything new to do.
There are also kludgy ways to create a fake socket behavior whereby the http connection never closes and you just keep sending data down the pipe, but if you can avoid it and just use a socket, you should.
One part of the project we are trying to undertake involves sending a message over bluetooth from a computer to an android phone. I was wondering if anyone has done something like this already who might be able to share some example code with us.
Thanks
Fernando
I would highly recommend checking out the following example: BluetoothChat # developer.android.com
I did a project a few months back where we designed a body-worn, wireless sensor board that would send readings to an Android phone over Bluetooth, and this example got me started. I apologize, but I cannot share my exact code at the moment.
The example allows two Android phones to chat with one another over Bluetooth and prints the messages to the screen. With a few changes to this example, you can send the raw data you need instead of user input. The BluetoothChatService class in that example (seen here) handles all the ugly stuff (listening for connections, connecting, etc) for you.
Good luck!