Bluetooth Data Transfer Example
The following example uses the Android Bluetooth APIs to construct a simple peer-to-peer messaging
system that works between two paired Bluetooth devices.
Unfortunately the Android emulator can’t currently be used to test Bluetooth functionality. In order to
test this application you will need to have two physical devices.
1. Start by creating a new BluetoothTexting project featuring a BluetoothTexting Activity.
Modify the manifest to include BLUETOOTH and BLUETOOTH_ADMIN permissions.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.paad.chapter13_bluetoothtexting"
android:versionCode="1"
android:versionName="1.0">
<application
android:icon="@drawable/icon"
android:label="@string/app_name">
<activity
android:name=".BluetoothTexting"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="5" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
</manifest>
2. Modify the main.xml layout resource. It should contain a ListView that will display the dis-
covered Bluetooth devices above two buttons — one to start the Server Socket listener, and
another to initiate a connection to a listening server.
Also include Text View and Edit Text controls to use for reading and writing messages across
the connection.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText
android:id="@+id/text_message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:enabled="false"
/>
<Button
android:id="@+id/button_search"
android:text="Search for listener"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/text_message"
/>
<Button
android:id="@+id/button_listen"
android:text="Listen for connection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/button_search"
/>
<ListView
android:id="@+id/list_discovered"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/button_listen"
android:layout_alignParentTop="true"
/>
<TextView
android:id="@+id/text_messages"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/button_listen"
android:layout_alignParentTop="true"
android:visibility="gone"
/>
</RelativeLayout>
3. Override the onCreate method of the BluetoothTexting Activity. Make calls to a collection
of stub methods that will be used to access the Bluetooth device and wire up the UI controls.
public class BluetoothTexting extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Get the Bluetooth Adapter
configureBluetooth();
// Setup the ListView of discovered devices
setupListView();
// Setup search button
setupSearchButton();
// Setup listen button
setupListenButton();
}
private void configureBluetooth() {}
private void setupListenButton() {}
private void setupListView() {}
private void setupSearchButton(){}
4. Fill in the configureBluetooth stub to get access to the local Bluetooth Adapter and store
it in a field variable. Take this opportunity to create a field variable for a Bluetooth Socket.
This will be used to store either the server or client communications socket once a channel
has been established. You should also define a UUID to identify your application when con-
nections are being established.
private BluetoothAdapter bluetooth;
private BluetoothSocket socket;
private UUID uuid = UUID.fromString("a60f35f0-b93a-11de-8a39-08002009c666");
private void configureBluetooth() {
bluetooth = BluetoothAdapter.getDefaultAdapter();
}
5. Create a new switchUI method. It will be called once a connection is established to enable
the Views used for reading and writing messages.
private void switchUI() {
final TextView messageText = (TextView)findViewById(R.id.text_messages);
final EditText textEntry = (EditText)findViewById(R.id.text_message);
messageText.setVisibility(View.VISIBLE);
list.setVisibility(View.GONE);
textEntry.setEnabled(true);
}
6.
Create the server listener by filling in the setupListenButton stub. The Listen button should
prompt the user to enable discovery. When the discovery window returns, open a Bluetooth
Server Socket to listen for connection requests for the discovery duration. Once a connection
has been made, make a call to the switchUI method you created in Step 5.
private static int DISCOVERY_REQUEST = 1;
private void setupListenButton() {
Button listenButton = (Button)findViewById(R.id.button_listen);
listenButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
intent disc;
disc = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
startActivityForResult(disc, DISCOVERY_REQUEST);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent
data) {
if (requestCode == DISCOVERY_REQUEST) {
boolean isDiscoverable = resultCode > 0;
if (isDiscoverable) {
String name = "bluetoothserver";
try {
final BluetoothServerSocket btserver =
bluetooth.listenUsingRfcommWithServiceRecord(name, uuid);
AsyncTask<Integer, Void, BluetoothSocket> acceptThread =
new AsyncTask<Integer, Void, BluetoothSocket>() {
@Override
protected BluetoothSocket doInBackground(Integer . . .params) {
try {
socket = btserver.accept(params[0]*1000);
return socket;
} catch (IOException e) {
Log.d("BLUETOOTH", e.getMessage());
}
return null;
}
@Override
protected void onPostExecute(BluetoothSocket result) {
if (result != null)
switchUI();
}
};
acceptThread.execute(resultCode);
} catch (IOException e) {
Log.d("BLUETOOTH", e.getMessage());
}
}
}
}
7. Now create the client-side connection code. By performing discovery and displaying each
of the possible devices, this code will provide a means for the client device to search for the
listening server.
7.1. Start by creating a field variable to store an Array List of discovered Bluetooth
Devices.
private ArrayList<BluetoothDevice> foundDevices;
7.2.Fill in the setupListView stub. Create a new Array Adapter that binds the List View
to the found devices array.
private ArrayAdapter<BluetoothDevice> aa;
private ListView list;
private void setupListView() {
aa = new ArrayAdapter<BluetoothDevice>(this,
android.R.layout.simple_list_item_1,
foundDevices);
list = (ListView)findViewById(R.id.list_discovered);
list.setAdapter(aa);
}
7.3. Create a new Broadcast Receiver that listens for Bluetooth Device discovery broad-
casts, adds each discovered device to the array of found devices created in Step 7-1,
and notifies the Array Adapter created in Step 7-2.
BroadcastReceiver discoveryResult = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
BluetoothDevice remoteDevice;
remoteDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
if (bluetooth.getBondedDevices().contains(remoteDevice)) {
foundDevices.add(remoteDevice);
aa.notifyDataSetChanged();
}
}
};
7.4 : Complete the setupSearchButton stub to register the Broadcast Receiver from the
previous step and initiate a discovery session.
private void setupSearchButton() {
Button searchButton = (Button)findViewById(R.id.button_search);
searchButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
registerReceiver(discoveryResult,
new IntentFilter(BluetoothDevice.ACTION_FOUND));
if (!bluetooth.isDiscovering()) {
foundDevices.clear();
bluetooth.startDiscovery();
}
}
});
}
8. The final step to completing the connection-handling code is to extend the setupListView
method from Step 7b. Extend this method to include an onItemClickListener that will
attempt to asynchronously initiate a client-side connection with the selected remote
Bluetooth Device. If it is successful, keep a reference to the socket it creates and make a call
to the switchUI method created in Step 5.
private void setupListView() {
aa = new ArrayAdapter<BluetoothDevice>(this,
android.R.layout.simple_list_item_1,
foundDevices);
list = (ListView)findViewById(R.id.list_discovered);
list.setAdapter(aa);
list.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View view,
int index, long arg3) {
AsyncTask<Integer, Void, Void> connectTask =
new AsyncTask<Integer, Void, Void>() {
@Override
protected Void doInBackground(Integer . . . params) {
try {
BluetoothDevice device = foundDevices.get(params[0]);
socket = device.createRfcommSocketToServiceRecord(uuid);
socket.connect();
} catch (IOException e) {
Log.d("BLUETOOTH_CLIENT", e.getMessage());
}
return null;
}
@Override
protected void onPostExecute(Void result) {
switchViews();
}
};
connectTask.execute(index);
}
});
}
9. If you run the application on two devices, you
can click the ‘‘Listen for connection’’ button on
one device, and the ‘‘Search for listener’’ button
on the other. The List View should then be popu-
lated with all the bonded devices within range, as
shown in Figure
If you select the other Android device running this
application from that list, a connection will be
established between the two devices. The follow-
ing steps will use this communications channel to
send simple text messages between the devices.
10. Start by extending the switchUI method. Add a
new key listener to the text-entry Edit Text to lis-
ten for a D-pad click. When one is detected, read
its contents and send them across the Bluetooth
communications socket.
private void switchUI() {
final TextView messageText = (TextView)findViewById(R.id.text_messages);
final EditText textEntry = (EditText)findViewById(R.id.text_message);
messageText.setVisibility(View.VISIBLE);
list.setVisibility(View.GONE);
textEntry.setEnabled(true);
textEntry.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View view, int keyCode, KeyEvent keyEvent) {
if ((keyEvent.getAction() == KeyEvent.ACTION_DOWN) &&
(keyCode == KeyEvent.KEYCODE_DPAD_CENTER)) {
sendMessage(socket, textEntry.getText().toString());
textEntry.setText("");
return true;
}
return false;
}
});
}
private void sendMessage(BluetoothSocket socket, String msg) {
OutputStream outStream;
try {
outStream = socket.getOutputStream();
byte[] byteString = (msg + " ").getBytes();
stringAsBytes[byteString.length − 1] = 0;
outStream.write(byteString);
} catch (IOException e) {
Log.d("BLUETOOTH_COMMS", e.getMessage());
}
}
11. In order to receive messages you will need to create an asynchronous listener that monitors
the Bluetooth Socket for incoming messages.
11.1.Start by creating a new MessagePoster class that implements Runnable. It should
accept two parameters, a Text View and a message string. The received message
should be inserted into the Text View parameter. This class will be used to post
incoming messages to the UI from a background thread.
private class MessagePoster implements Runnable {
private TextView textView;
private String message;
public MessagePoster(TextView textView, String message) {
this.textView = textView;
this.message = message;
}
public void run() {
textView.setText(message);
}
}
11.2. Now create a new BluetoothSocketListener that implements Runnable. It should
take a Bluetooth Socket to listen to, a Text View to post incoming messages to, and
a Handler to synchronize when posting updates.
When a new message is received, use the MessagePoster Runnable you created in
the previous step to post the new message in the Text View.
private class BluetoothSocketListener implements Runnable {
private BluetoothSocket socket;
private TextView textView;
private Handler handler;
public BluetoothSocketListener(BluetoothSocket socket,
Handler handler, TextView textView) {
this.socket = socket;
this.textView = textView;
this.handler = handler;
}
public void run() {
int bufferSize = 1024;
byte[] buffer = new byte[bufferSize];
try {
InputStream instream = socket.getInputStream();
int bytesRead = −1;
String message = "";
while (true) {
message = "";
bytesRead = instream.read(buffer);
if (bytesRead != −1) {
while ((bytesRead==bufferSize)&&(buffer[bufferSize-1] != 0)) {
message = message + new String(buffer, 0, bytesRead);
bytesRead = instream.read(buffer);
}
message = message + new String(buffer, 0, bytesRead − 1);
handler.post(new MessagePoster(textView, message));
socket.getInputStream();
}
}
} catch (IOException e) {
Log.d("BLUETOOTH_COMMS", e.getMessage());
}
}
}
11.3. Finally, make one more addition to the swichUI method, this time creating and
starting the new BluetoothSocketListener you created in the previous step.
private Handler handler = new Handler();
private void switchUI() {
final TextView messageText = (TextView)findViewById(R.id.text_messages);
final EditText textEntry = (EditText)findViewById(R.id.text_message);
messageText.setVisibility(View.VISIBLE);
list.setVisibility(View.GONE);
textEntry.setEnabled(true);
textEntry.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View view, int keyCode, KeyEvent keyEvent) {
if ((keyEvent.getAction() == KeyEvent.ACTION_DOWN) &&
(keyCode == KeyEvent.KEYCODE_DPAD_CENTER)) {
sendMessage(socket, textEntry.getText().toString());
textEntry.setText("");
return true;
}
return false;
}
});
BluetoothSocketListener bsl = new BluetoothSocketListener(socket,
handler, messageText);
Thread messageListener = new Thread(bsr);
messageListener.start();
}
Interesting tutorial, could you provide the sample project for download?
ReplyDeleteGreetings
Stefan
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Hi manoj, can you pls send me code to my mail :
Deletemounika.in1100@gmail.com
Hi manoj, can you pls send me code to my mail : persiabudi@gmail.com
DeleteHi Manoj,
ReplyDeletegreat job!
Very interesting tutorial.
Better than classic Android chat example.
Regards
Mirko Ugolini
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
HI Manoj,
DeleteGood Job. Please mail me code for the same
Regards
Malathesh
Malatheshj@gmail.com
I am getting application has stopped unexpectedly.Please Try again.How do i rectify it??
ReplyDeleteThanks.
I think he forgot to make instance of foundDevices
Deleteprivate void setupListView() {
foundDevices = new ArrayList();
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
please provide me full code to send image send via Bluetooth for android..
ReplyDeleteSorry Haresh this bluetooth app does not transfer raw data , it is only for text chat.
Deletei used your tutorial for bluetooth connection.when i try to connect to other device, then it gives me focus on Edit text but when i enter some text and move the text pad down, it is not responding.Can you please help me regarding this?.
ReplyDeleteHi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Hi Manoj,
ReplyDeleteNice Tutorials for Blue tooth Example.Can you Post the Full Source code because it will help for me in development Process.My Email Id Shankar.kpu@gmail.com. Awaiting for reply...
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Manoj,
ReplyDeleteThank you for your tutorials for Blue tooth Example but I still have some place didn`t understand. Can you post Full Source code? My Email is mrraysum@gmail.com
i used this tutorial for bluetooth connection.when i try to connect to other device, then it gives me focus on Edit text but when i enter some text and move the text pad down, it is not responding.Can you please help me regarding this?.
ReplyDeleteMy Email is mukund.ixltech@gmail.com
sorry you but i unknown this your code, can it run? i trying to undertein, but all my code is fail. i hope you can help me
ReplyDeletethis is my code
package at.example.bluetooththenumbereight;
import java.io.IOException;
import java.util.UUID;
import android.os.Bundle;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
@SuppressLint("ShowToast") public class AndroidBluetooth extends Activity {
final static String toast = "IAM HERE";
final static String TAG ="SimpleConnect";
UUID MY_UUID;
BluetoothDevice bd;
BluetoothAdapter ba;
TextView tv;
Button btconnect;
BluetoothSocket socket;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tv = (TextView) findViewById(R.id.txDevice);
MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
ba = BluetoothAdapter.getDefaultAdapter();
if(!ba.isEnabled()){
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivity(intent);
Intent intent1 = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
startActivity(intent1);
}
}
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
btconnect = (Button)findViewById(R.id.btConnect);
btconnect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
boolean b = ba.checkBluetoothAddress("00:15:83:15:A3:10");
BluetoothSocket tmp = null;
//If valid bluetoothAddress
if(b) {
bd = ba.getRemoteDevice("00:15:83:15:A3:10"); //Getting the Verifier Bluetooth
tv.setText(bd.getAddress()+"\n"+bd.getName());
//Trying to create a RFCOMM socket to the device
try {
tmp = bd.createRfcommSocketToServiceRecord(MY_UUID);
} catch (IOException e) {
}
socket = tmp;
try {
socket.connect();
} catch (IOException e) {
Toast.makeText(getApplicationContext(), "No connection was made! Exception: " + e.getMessage(), Toast.LENGTH_LONG).show();
}
//Print out the sockets name
String test = tmp.toString();
Toast.makeText(getApplicationContext(), "The bluetooth socket: " +test, Toast.LENGTH_LONG).show();
}
else {
Toast.makeText(getApplicationContext(), "FALSE, No bluetooth device with this address", Toast.LENGTH_LONG).show();
}
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
it notice createRF... no open or timeout
this code use to connect to bluetooth device, but it can't connect
DeleteManoj,
ReplyDeleteThank you for your great tutorial for Bluetooth Example.
Can you post me full source code?
My Email is wojtlub@gmail.com
TIA
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Manoj,
ReplyDeleteThank you for your great tutorial for Bluetooth Example.
Can you post me full source code?
My Email is azizul_91i@yahoo.com
Wan
Lal Bosco
ReplyDeleteThank you for your tutorial , its help me a lot for my master program thesis. I can pair and connect(MAC Adress) the two devices.
i got problem with Async method.
How can i transfer the variable between these two devices ?
Email id:lalbosco55@gmail.com
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Manoj,
ReplyDeleteThank you for your great tutorial for Bluetooth Example.
Can you post me full source code?
My Email david-2008@yandex.ru
David (from Belarus)
please mail me source code at arslanshl@gmail.com
ReplyDeleteCan you mail me source code at leandrobezerramarinho@gmail.com
ReplyDeletenice tutorial can you send to me the full project please!!
ReplyDeletemy email is Motaz.Osama.CSD@gmail.com
Hi Manoj...excellent tutorial.Can you please email me the source code to abhi_ee_15@yahoo.com...
ReplyDeletenice tutorial can you send to me the full project ..
ReplyDeletemy email is codemen.ridwan@gmail.com
Very good tutorial! can you send to me the full project??
ReplyDeleteMy email is: alberto.crespo86@gmail.com
can you please mail me the full source code ..i need it for my project work
ReplyDeletemy email id :: anuragrewar2007@gmial.com
Please could you send me friend by email is that I am new and want to see how the process of scanning devices to find this really confusing thanks beforehand jose_xp_799@hotmail.com
ReplyDeleteNice Tuts...!
ReplyDeletei want to connect blutooth device mic with my android phone via blutooth and on a single click i want to tranfer comunication sounds between phone and mic....can u suggest me for a tutorial an d example..my email id is amitsharma.kks@gmail.com
ReplyDeleteplease mail me source code at chansaifok@yahoo.com
ReplyDeleteplease mail me source code at mr.hoaianhmonster@gmail.com.Thank u !!!
ReplyDeleteThank you for your great tutorial for Bluetooth Example.
ReplyDeleteCan you post me full source code?
My Email is huybip@gmail.com
HUYBIP
Perfect article. I am just learning to create applications using Bluetooth and I think this is one of the best (or best :) ) article. I would be very happy if someone sent me a full code. My email: hawksvk@gmail.com .
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteVery good tutorial! can you send to me the full project??
ReplyDeleteMy email is: nagarjuna519@gmail.com
Nice tutorial can You send me complete project ?
ReplyDeletemy mail id is ashokagarwalbtp@gmail.com
Thank you for your great tutorial for Bluetooth Example.
ReplyDeleteCould you post me full source code please?
My Email is: hemializa@gmail.com
Hemia
PhoneGap + bluetooth cool staff. Thanks for the nice tutorial. If not difficult, you can send the complete project at my email: slayter007@gmail.com
ReplyDeleteThanks in advance.
can u send me a full source code??
ReplyDeletemy email:: jarman.cse@gmail.com
Very nice tutorial Manoj, could you please post me the full source code?
ReplyDeleteMy email is scrsunil@gmail.com
hai i want full code for this because i am new android which is help to me...Please send this id satheeshcapsone@gmail.com
ReplyDeleteCan u send me all source code of this example...plz
ReplyDelete有難うございました。おかげさまで出来ました!!:):):)
ReplyDeleteNice tutorials
ReplyDeleteCan u send me all source code of this example quangvv88.it@gmail.com
ReplyDeleteThanks!
Greate tutorial.
ReplyDeleteCould you send me full source code of this example?
duongtuhuybk@gmail.com
Thanks
Great Tutorial.
ReplyDeletePlz send me the full source code.
naveenpgowda89@gmail.com
Can you send me all source code of this example le.minh.cn@gmail.com
ReplyDeleteThanks!
Great Tutorial.
ReplyDeletePlz send me source code.
ly.truong.dn@gmail.com
Thanks
It's a great tutorial.
ReplyDeletePlease send me the code.
arhui10@gmail.com
Thanks.
Hi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Great tutorial......can you send to me the full project please!!
ReplyDeletemy email is daniele.rigano@gmail.com
It is not showing the list view for the devices which availavle ...please help
ReplyDeleteMy email address is
arpitdhuriya@gmail.com
Superb tutorial better than bluetoothchat example. Can you send me full example source code to implement
ReplyDeleteHi ,
Deletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Great tutorial......can you send to me the full project please!
ReplyDeletemy email is tuibaoboi177@gmail.com
Thank
Can you mail me source code at amine.chared@laposte.net
ReplyDeletePossible to send me the source code. I would help me lots. Thanks in advance, jab45jab@gmail.com
ReplyDeleteGreat Tutorial.
ReplyDeletePlz send me the full source code.
aolgundemir@gmail.com
Great tutorial, is it possible to send me the full project? please. It would greatly help me. Thanks in advance, qvestor@gmail.com
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi there...I have followed your code until step7, I have encountered a problem with switchViews().. Is there anything I missed out? Hope to receive your reply asap...
ReplyDeleteHi, great tutorial, could you send me the full code cause I'm getting some errors?
ReplyDeleteThanks in advance!!
swuw231@gmail.com
Me too. I complaint the eclipse "stringAsBytes" where I find? does not exist in the code?
ReplyDeleteGreat tutorial.
ReplyDeletePlz send me the full source code.
lisa-zi@web.de
this tutorial is really helpful.. thank u..
ReplyDeletecan u still send me the full source code please..
my id is abhimanyu_bhatnagar2000@yahoo.com
thanx in advance.. :)
very nice tutorial, can you please send me the full source code to
ReplyDeletesupernage@gmx.de
Hi, great tutorial, could you send me the full code cause I'm getting some errors?
ReplyDeleteThanks in advance!!
seagull271@gmail.com
This comment has been removed by the author.
ReplyDeleteHi, Its a very useful tutorial. Much helpful
ReplyDeleteCan you please send me the full souce code at jagannath.sahoo@gmail.com
Thanks in advance.
Jagan
great!! i need this example for my project . So kindly send it for me via e-mail
ReplyDeleteealbaik@gmail.com
Warm Regards
Very helpful, thanks.
ReplyDeleteCould you please send me source code at mala9.siatria@gmail.com?
This comment has been removed by the author.
ReplyDeleteHello, could you send me the complete project? I'm having some problems with the code. Email: yusuchi17@gmail.com
Deletehi.
ReplyDeleteI'm making a project for a bluetooth controled pumb, can you send me your full project?thanks
nunosantos1991@gmail.com
Hi Manoj,
ReplyDeletethis is a good tutorial, but I have some problem with code. Would you like send me project? cecvarekf@gmail.com
All the best
Franta
Simply and elegantly explained. Yet the code has so many errors in it, it doesn't compile. Can you also send me compilable version of the project please ? correioafp [at] gmail.com
ReplyDeleteThanks!
Hello Manoj, how are you? hope fine,
ReplyDeletei'm trying to develop an application that have to connect to another device (not android) and receive some messages from this device. So i think that i need to develop the "client side" and "input stream" . Your explain are being very helpful for me, but im getting some errors yet. Can you send me your sample project? souza.rs@outlook.com
thank you so much and best regards!
Hello Manoj !.
ReplyDeleteHow are you..i hope fine..I am trying the code for transfer the data via bluetooth Android mobile to any other mobile.If you have code means send that code . my mail id shansoft.smv@gmail.com.
thanks a lot...
Blue tooth data transfer project,could you provide the same project for download?
ReplyDeleteGud work sir..cld u please send me the code at d earliest. I am working on my thesis which involves the use of this module.
ReplyDeleteThanking you,
Sanjana
sanjana2890@gmail.com
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteIs it your code? Or it is from book "Professional Android" by Reto Meier
ReplyDeleteIt is such a great work and you explained it clearly, but I got some errors!!!
ReplyDeleteSo, can you send me the project code ebtisam.cs@gmail.com
Code is available here:
ReplyDeleteProfessional Android 4 Application Development
Look at chapter 16
Can you please share me your source code to prasannamate87@gmail.com
ReplyDeleteCan you please share me your source code to mtestingu@gmail.com
ReplyDeleteCan you please share me your source code to clemos92@gmail.com
ReplyDeleteHi i tried your example for bluetooth communication, and i must say is very good, however i'm using a RN-42 bluetooth i bought from sparkfun electronics, i'm able to connect to it via my HTC Evo shift i wrote a small program in visual studio to receive and send the text strings, i can receive the strings ok sent from my phone to my program written in visual studio, but when i send a string back to the bluetooth module, your program shuts down giving me a foreclosed error, i have tried this before with app inventor and it should work ok, the module is connected to my computer through a serial port, i need help figuring out where this is going wrong! can you maybe give me some tips.
ReplyDeleteHi Manoj,
ReplyDeletethis is a good tutorial, but I have some problem with code. Would you like send me project? arrya_omoshiroi@yahoo.com
All the best
Hi sir,
ReplyDeleteIts very nice tutorial and i got some errors and please can u send me project????? dinak1989@gmail.com
Sir,
ReplyDeleteAfter i click list view and its shows error like force closed and can u please help me out ...im waiting
Hello, please send the entire project of this tutorial to dunatv@gmail.com
ReplyDeleteI try to develop android application is distorted characters incoming messages how to fix it.
ReplyDeleteBufferedReader rd = new BufferedReader(new InputStreamReader(
socket.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
System.out.println(line.getBytes("ISO-8859-1"));
System.out.println(line.getBytes("UTF-8"));
System.out.println(line.getBytes("US-ASCII"));
}
RESULT:
� � �
Thanks for the great tutorial. Please can you send me the full code of this tutorial to my email:
ReplyDeletehaydersaadi1986@yahoo.com
hey manoj .
ReplyDeletei found error in stringAsByte ...What is this ???
hey Manoj ,
ReplyDeletecould u please send me above code at hiteshsingh1101@gmail.com
Hey Manu,
ReplyDeleteNice Tutorials for Bluetooth Example.Can you please share me your source code to amr.sample@gmail.com
Hi Manoj,
ReplyDeleteGreat job!!! Could you share your project with me? crisconru@gmail.com
Thanks
Hi Manoj,
ReplyDeleteThanks for the great tutorial!!! Could you share your project with me? desarrollo@dyscor.com.ar
Thanks
Hi.Manoj,
ReplyDeleteThank you for your great tutorial for Bluetooth Example.
Can you email me full source code?
My Email raja_abdullah88@yahoo.com
TQVM
Hi.Manoj,
ReplyDeleteThank you for your great tutorial.
Can you email me full source code?
My Email quockhanhtruong.2010@gmail.com
Hello
ReplyDeleteVery nice tutorial can you please send me the full source code to bmccruz@live.com
Most grateful if you can send full source code to awid1100@gmail.com
ReplyDeleteHello Manoj,
ReplyDeleteAmazing tutorial can you please send me the full source code to zulicdavor@gmail.com
Thank you
can you please send me the full source code to anandsutar36@gmail.com
ReplyDeleteHello,
ReplyDeleteThanks for the tutorial.
Could you please send me the full source code at blingkling123@gmail.com ?
Thanks in advance
Can you please send me the full source code to zamir.zhurda@gmail.com?
ReplyDeleteTanks
Hai,
ReplyDeleteCould you please mail me the complete source code..
suhela.mali@gmail.com
please mail me the project folder grajasumant@ieee.org
ReplyDeleteHello,
ReplyDeleteThanks for the tutorial.
Could you please send me the full source code at komo.luka@gmail.com ?
Thanks in advance
Hello,
ReplyDeleteCould you please send me the full source code at debieche.abdelmounaim@gmail.com ??
Thanks
Thank you for your great tutorial for Bluetooth Example.
ReplyDeleteCan you post me full source code?
My Email: romanmed02@walla.com
Send me file on my email
ReplyDeleteNour.fakhr@gmail.com
good one and helpfull
ReplyDeleteplz send full source code to Umeshmysore1@gmail.com
Great Tutorial.
ReplyDeletePlease send me the full source code.
chtgkce@gmail.com
plz send full source code to ssgaria@gmail.com
ReplyDeletepls send me too amonk@wp.pl
ReplyDeleteNice Tutorials for Blue tooth Example.Can you Post the Full Source code because it will help for me in development Process.My Email Id seang_nu@live.com. Awaiting for reply...
ReplyDeleteVery Useful Tutorial for me can please send me complete Project to my mail kumarramtech@gmail.com,it will be very helpful for me in further development.
ReplyDeleteSir,Please send me dis code to my email Id : nehakhurana43@gmail.com
ReplyDeletethank u very much for the the information... Actually I am very new at android application development.. It will be very helpful for me if you can send me the full project..
ReplyDeleteMy email id: mainak250189@gmail.com
good one and helpfull
ReplyDeleteplz send full source code to sanat2003@gmail.com
Great Tutorial. Can you please send me source code to rajeev.sharma@netsmartz.net.
ReplyDeleteThanks
Can you kindly send me the source code?
ReplyDeletengooitingting@gmail.com
great job!!!.. nices tut!... can u send me your source for download?... my email is... yugiho_1234@hotmail.com
ReplyDeleteGreat Tutorial.
ReplyDeletePlease send me the full source code.
leoromo.energy@gmail.com
Thanks! Please send me the full source code.
ReplyDeletebryanward38@gmail.com
I would be glad if you send me your code.
ReplyDeletedennis_kal@hotmail.com
Congratulations for the iniciative. Would you please share the source code ? Thanks in advance. piparopa@gmail.com
ReplyDeleteGreat Tutorial.
ReplyDeletePlease send me the full source code.
vikasvishvas@gmail.com
It's very simple to understand thanks for and you guys excellent job this type of functionality required plz give me a full source coed i will very really thank full to you.
ReplyDeletesindhalmanish@gmail.com
Hello, please send the entire project of this tutorial to tailieu.bk93@gmail.com
ReplyDeleteWould you share the full source code ? Please send mail to ajisamudraa@gmail.com
ReplyDeleteThanks
It would be great if could send me the source code please.
ReplyDeletebanerjeeankit@yahoo.com
Thank you
Hi. Could you share the source code for this proj? my email add is ahjie87@gmail.com
ReplyDeleteshould you send the source code
ReplyDeletehichamuradess@gmail.com
thank you
Hola, comienzo a programar en android y tengo un tropiezo al intentar una conexion entre un dispositivo android y un PIC, mantengo la conexion por un momento incluso logro apagar un led pero cuando intento encenderlo ya no me lo permite, pierdo la conexion con el modulo bluetooth podrian ayudarme con alguna referencia, por favor!.....Gracias :)
ReplyDeleteVery good tutorial! can you send to me the full project??
ReplyDeleteMy email is: crnsatishkumar90@gmail.com
please mail me source code at hosseini.it83@gmail.com
ReplyDeletecheck for more android interview questions @ http://skillgun.com
ReplyDeleteHi, Thanks for your sample project.
ReplyDeletePlease send me the project source code.
My mail is eishweyichooo@gmail.com.
Hi, can you mail me the full project please?
ReplyDeleteMy email is: chuz41@gmail.com
Please give me full project:
ReplyDeletebappy392@gmail.com
Hi, thanks for the tutorial :) can you mail me the source code? dromandave@gmail.com
ReplyDeleteVery nice tutorial, can you give me the source code please? :)
ReplyDeletedudin.mukhtar@gmail.com
Great tutorial, can you mail me the source code please? mbpe_199000@hotmail.com
ReplyDeletethanks.
Nice tutorial, Can you please mail the full source code of this, my email id is
ReplyDeleteaswanthrc@gmail.com
could u please mail me source code at viplovekarhade@gmail.com
ReplyDeleteHi Manoj,
ReplyDeleteCould u pls send me the full code at htijnar11@gmail.com
Thanks in advance.
Hi Manoj,
ReplyDeleteThanks for the great tutorial!!! Could you share your project with me? Actually i am doing a project which includes this part.Please send this as soon as possible.
my email is ronak0495@gmail.com
Thanks
Nice tutorial..can you send to me the full project please!
ReplyDeletedeepakd.sangamone@gmail.com
Thanks..
will u plz mail me ur full source code , feel ur code will help me alot, i need to transfer data to a remote via bluetooth using android, i wish to provide input data of a calculator to my local device which i need to transfer to a remote device, get the computation done in the remote and then the result again back by bluetooth, my email biswajitpatra131@gmail.com
ReplyDeletehi i want full code for this because i am new android which is help to me...Please send this id deepakd.sangamone@gmail.com
ReplyDeleteplease mail me source code at krishnapillai87@gmai.com
ReplyDeleteplease mail me source code at neoctd@gmail.com
ReplyDeletehi,
ReplyDeletei realy like your tutorial
im trying to understang how bluetooth works, how to create conection between devices
i tried to make this code run but have a lot of problems
can you send me a project with this code to ewijaaa@gmail.com
thanks a lot for sharing your knowledge
thanks for totaril , i used this tutorial for bluetooth connection.when i try to connect to other device, then it gives me focus on Edit text but when i enter some text and move the text pad down, it is not responding.Can you please help me regarding this?.
ReplyDeleteemail:tesla0202@gmail.com
Awsome tutorial , Please send me the source code at my email log.nishant@gmail.com
ReplyDeleteplease mail me source code at ankit.pathak317@gmail.com
ReplyDeleteCan you send me the full project please?
ReplyDeletemy e-mail is
michaelchatzakis@gmail.com
Thanks!
Great tutorial......can you send to me the full project please!
ReplyDeletemy email is cykeltur@gmail.com
thanks
Great tutorial......can you send to me the full project please!
ReplyDeletemy email is gaaguayo@alumnos.ubiobio.cl
thanks , i used this tutorial for bluetooth connection.when i try to connect to other device, then it gives me focus on Edit text but when i enter some text and move the text pad down, it is not responding.Can you please help me regarding this?
ReplyDeletekp_ege@hotmail.com
Thank you
Thank you for your great tutorial.
ReplyDeleteCan you post me full source code?
My Email is ch.rangalakshmi@gmail.com
can you send to me the full project please!
ReplyDeletemy email is aminaabdelkafi93@gmail.com
Thank
Can you send me full example source code
ReplyDeleteAwesome Tutorial, May you please send me the sourcecode@ libran.download@gmail.com. Thanks in advance.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteCan you give me the file please... I try with this but can't do.... Help me please....
ReplyDeleteCan you give me the source file...
ReplyDeleteCan you share a link of this project source code??
ReplyDeleteGreat, but im facing some difficults , so can you send me source code of it please
ReplyDeleteMy email is riteshkotiyal@live.in
thanks
can you send to me the full project please!! i need it :(
ReplyDeletemy email :: Bassam_Sha3ban@yahoo.com
Hi Manoj,
ReplyDeleteThis is very intresting tutorial, I have used this tutorial but I am facing some issues, Can u Please provide full source code of this tutorial.
My Email id is- arshad.shaikh1590@gmail.com
Thanks
Great tutorial Manoj...... I have used this source but I am facing some issues, Can you please send me full source of this tutorial
ReplyDeletemy email is arshad.shaikh1590@gmail.com
Thank
Hi Manoj.Great work you have done.Can you please send me the full code.
ReplyDeleteMy email id is itsme.akshitajain@gmail.com
please send me the code as soon as possible
hey Manoj .. Great tutorial. Can you please send me the full code.
ReplyDeletei need it urgently.
My email-id is itsme.akshitajain@gmail.com
Hi ,
ReplyDeletehttps://www.dropbox.com/s/cm88h01aj94we8m/BluetoothCommunication.apk?dl=1
Please download and see bluetooth chat connections, if you like and required this code please mail me , I will send it via email.
Hello Manoj,
DeleteGreat tutorial
Can you please send me the full code to jennytran14101987@gmail.com
Thanks
Sir I want to send numeric data via Bluetooth.. Please help me out or send me reference code for that
ReplyDeleteDoes this works latetly?
ReplyDeleteHello,
ReplyDeleteI could not download the links from the post you posted. Could you send the source code to my email? Nilmarpublio@gmail.com
Thanks in advance.
This comment has been removed by the author.
ReplyDeletemanojmca1991@gmail.com
ReplyDeletenice tutorial. Can you provide code to download?
ReplyDeleteon email id : nihar40000@gmail.com
DeleteYeah, this article is amazing. Thanks for posting this informative article.
ReplyDeleteThe Android users are increasing daily and I hope this recovery tool may help the smartphone users which are suffering from data loss and media files deletion from them.
I would like to recommend you the android data lost users to use Android Data Recovery Software to get easily and in just a few steps they will get back their all lost data from LeMax, Realme, Samsung, Blu Dash, Xiaomi, Huawei, ZTE, Lenovo, Motorola, Oppo, OnePlus, and much more mobile phones also.
dear sir mail me plz mohammadikram20001@gmail.com
ReplyDelete