SlideShare a Scribd company logo
1 of 14
BLUETOOTH ANDROID
APPLICATION
Presented By:
Sumit Chakraborty
Pratik Shetty
CONTENTs
1.

Introduction.

2.

Bluetooth Basics.

3.

Bluetooth Permission.

4.

Setting Up Your mobile Bluetooth.

5.

Connecting Android phone to Arduino(using Rn42).
INTRODUCTION
Using the Bluetooth APIs, an Android application can perform
the following:
•Scan for other Bluetooth devices.
•Query the local Bluetooth adapter for paired Bluetooth devices.
•Establish RFCOMM channels.
•Connect to other devices through discovery.
•Transfer data to and from other devices.
BLUETOOTH BAsICs
All Bluetooth API’s are present in android.bluetooth package.
1.Bluetooth Adapter: It’s the entry-point for all Bluetooth
interaction.
2.Bluetooth Device: It is used to  request a connection with a
remote device through a BluetoothSocket or query information
about the device such as its name, address, class, and bonding
state.
3.Bluetooth Socket: This is the connection point that allows an
application to exchange data with another Bluetooth device via
InputStream and OutputStream.
Cont..
4.

Bluetooth Server socket: Represents an open server socket that
listens for incoming requests.

5.

Bluetooth Class: Describes the general characteristics and
capabilities of a Bluetooth device.
Bluetooth Permission
We need this permission to perform any Bluetooth
communication e.g. requesting a connection, accepting a
connection and transferring data.

If you want your app to initiate device discovery or
manipulate Bluetooth settings, you must also declare the
BLUETOOTH_ADMIN permission.
Cont..
setting uP the Bluetooth
Before your app can communicate over Bluetooth verify that Bluetooth is
supported on your mobile.
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();

  if(btAdapter==null) {
errorExit("Fatal Error", "Bluetooth not support");
} else {
if (btAdapter.isEnabled()) {
//promt user that the Bluetooth is already On
} else {
//Prompt user to turn on Bluetooth
Intent enableBtIntent = new
Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, 1);
}
}
Managing a connection
The ConnectThread is a inner class, it passes a message to the
Handler which then carries out the required action
cont..
Handler
Allows you to send and process message and runnable object
associated with a thread’s Message queue.
The main uses of Handler are:1.To schedule messages that can be executed as some point in the
future.
2.To Enqueue an action to be performed on a different thread.
cont..
CirCuit Diagram
Bluetooth
Module

FlexiForce
Sensor
Bluetooth android application For interfacing with arduino

More Related Content

What's hot

Cong nghe bluetooth_va_ung_dung
Cong nghe bluetooth_va_ung_dungCong nghe bluetooth_va_ung_dung
Cong nghe bluetooth_va_ung_dung
Viet Nam
 

What's hot (20)

Modbus introduction
Modbus introductionModbus introduction
Modbus introduction
 
Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notes
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
 
Tìm hiểu về bluetooth
Tìm hiểu về bluetoothTìm hiểu về bluetooth
Tìm hiểu về bluetooth
 
Truyen song-va-anten
Truyen song-va-antenTruyen song-va-anten
Truyen song-va-anten
 
Bnc Connectors
Bnc Connectors Bnc Connectors
Bnc Connectors
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
Avr timers
Avr timersAvr timers
Avr timers
 
Beaglebone Black Introduction with Architecture and Code
Beaglebone Black Introduction with Architecture and CodeBeaglebone Black Introduction with Architecture and Code
Beaglebone Black Introduction with Architecture and Code
 
IEEE Standards
IEEE StandardsIEEE Standards
IEEE Standards
 
Scada expert Clear Scada
Scada expert Clear ScadaScada expert Clear Scada
Scada expert Clear Scada
 
Profibus
ProfibusProfibus
Profibus
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
 
Cong nghe bluetooth_va_ung_dung
Cong nghe bluetooth_va_ung_dungCong nghe bluetooth_va_ung_dung
Cong nghe bluetooth_va_ung_dung
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
CSMA/CA
CSMA/CACSMA/CA
CSMA/CA
 
Esp32 cam arduino-123
Esp32 cam arduino-123Esp32 cam arduino-123
Esp32 cam arduino-123
 
Ethernet
EthernetEthernet
Ethernet
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
OPC OLE for Process Control (OPC)
OPC OLE for Process Control (OPC)OPC OLE for Process Control (OPC)
OPC OLE for Process Control (OPC)
 

Viewers also liked

Next Generation Blue Z and Bluetooth Smart Drivers
Next Generation Blue Z and Bluetooth Smart DriversNext Generation Blue Z and Bluetooth Smart Drivers
Next Generation Blue Z and Bluetooth Smart Drivers
Ryo Jin
 
RFID and IR Based Attendance System
RFID and IR Based Attendance SystemRFID and IR Based Attendance System
RFID and IR Based Attendance System
Atiq Shaikh
 

Viewers also liked (20)

Android-Arduino interaction via Bluetooth
Android-Arduino interaction via BluetoothAndroid-Arduino interaction via Bluetooth
Android-Arduino interaction via Bluetooth
 
Android bluetooth
Android bluetoothAndroid bluetooth
Android bluetooth
 
Communication entre android et arduino via bluetooth
Communication entre android et arduino via bluetoothCommunication entre android et arduino via bluetooth
Communication entre android et arduino via bluetooth
 
Connect your Android to the real world with Bluetooth Low Energy
Connect your Android to the real world with Bluetooth Low EnergyConnect your Android to the real world with Bluetooth Low Energy
Connect your Android to the real world with Bluetooth Low Energy
 
Android Bluetooth Introduction
Android Bluetooth IntroductionAndroid Bluetooth Introduction
Android Bluetooth Introduction
 
QML + Arduino & Leap Motion
QML + Arduino & Leap MotionQML + Arduino & Leap Motion
QML + Arduino & Leap Motion
 
myresume
myresumemyresume
myresume
 
Next Generation Blue Z and Bluetooth Smart Drivers
Next Generation Blue Z and Bluetooth Smart DriversNext Generation Blue Z and Bluetooth Smart Drivers
Next Generation Blue Z and Bluetooth Smart Drivers
 
BlueMaemo - Bluetooth HID mouse & keyboard for Maemo
BlueMaemo - Bluetooth HID mouse & keyboard for MaemoBlueMaemo - Bluetooth HID mouse & keyboard for Maemo
BlueMaemo - Bluetooth HID mouse & keyboard for Maemo
 
Enable talk
Enable talkEnable talk
Enable talk
 
Interfacing with Arduino
Interfacing with ArduinoInterfacing with Arduino
Interfacing with Arduino
 
Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processing
 
Coders need to learn hardware hacking NOW
Coders need to learn hardware hacking NOWCoders need to learn hardware hacking NOW
Coders need to learn hardware hacking NOW
 
Interfacing bluetooth with arduino
Interfacing bluetooth with arduinoInterfacing bluetooth with arduino
Interfacing bluetooth with arduino
 
Android mobile phone controlled bluetooth robot
Android mobile phone controlled bluetooth robotAndroid mobile phone controlled bluetooth robot
Android mobile phone controlled bluetooth robot
 
Bluetooth Chat
Bluetooth ChatBluetooth Chat
Bluetooth Chat
 
Android - Bluetooth
Android - BluetoothAndroid - Bluetooth
Android - Bluetooth
 
Automation
AutomationAutomation
Automation
 
RFID and IR Based Attendance System
RFID and IR Based Attendance SystemRFID and IR Based Attendance System
RFID and IR Based Attendance System
 
RFID Based Student Attendance Management System in India
RFID Based Student Attendance Management System in IndiaRFID Based Student Attendance Management System in India
RFID Based Student Attendance Management System in India
 

Similar to Bluetooth android application For interfacing with arduino

Android Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth ConnectionAndroid Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth Connection
Jussi Pohjolainen
 
Assistive Technology_Research
Assistive Technology_ResearchAssistive Technology_Research
Assistive Technology_Research
Meng Kry
 
208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf
208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf
208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf
smilichitti
 
Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01
nagapriyanka
 
Control Pc Via Bluetooth Enable Mobile
Control Pc Via Bluetooth Enable MobileControl Pc Via Bluetooth Enable Mobile
Control Pc Via Bluetooth Enable Mobile
Samiul Hoque
 
Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01
ramaswamireddy challa
 
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and BluetoothWindows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
Oliver Scheer
 
Bluetooth Technology
Bluetooth TechnologyBluetooth Technology
Bluetooth Technology
Manish Sharma
 
Bluetooth wireless technology basics
Bluetooth wireless technology basicsBluetooth wireless technology basics
Bluetooth wireless technology basics
Kumar
 
Android accessories session 2
Android accessories session 2Android accessories session 2
Android accessories session 2
Sathish Raju
 

Similar to Bluetooth android application For interfacing with arduino (20)

Bluetooth based-chatting-system-using-android-docx
Bluetooth based-chatting-system-using-android-docxBluetooth based-chatting-system-using-android-docx
Bluetooth based-chatting-system-using-android-docx
 
Android & Beacons
Android & Beacons Android & Beacons
Android & Beacons
 
Android Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth ConnectionAndroid Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth Connection
 
Assistive Technology_Research
Assistive Technology_ResearchAssistive Technology_Research
Assistive Technology_Research
 
208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf
208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf
208 jpa016 --multy-user-mobile-bluetooth-two-way-text-chat-pdf
 
Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01
 
Control Pc Via Bluetooth Enable Mobile
Control Pc Via Bluetooth Enable MobileControl Pc Via Bluetooth Enable Mobile
Control Pc Via Bluetooth Enable Mobile
 
Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01
 
Esp32 bluetooth networking_user_guide_en
Esp32 bluetooth networking_user_guide_enEsp32 bluetooth networking_user_guide_en
Esp32 bluetooth networking_user_guide_en
 
HyWAI Web Bluetooth API
HyWAI Web Bluetooth APIHyWAI Web Bluetooth API
HyWAI Web Bluetooth API
 
JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)
 
Bluetooth low energy
Bluetooth low energyBluetooth low energy
Bluetooth low energy
 
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and BluetoothWindows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
 
Android based security and home
Android based security and homeAndroid based security and home
Android based security and home
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
Bluetooth Technology
Bluetooth TechnologyBluetooth Technology
Bluetooth Technology
 
A brief overview of BLE on Android
A brief overview of BLE on AndroidA brief overview of BLE on Android
A brief overview of BLE on Android
 
Bluetooth wireless technology basics
Bluetooth wireless technology basicsBluetooth wireless technology basics
Bluetooth wireless technology basics
 
C00186949
C00186949C00186949
C00186949
 
Android accessories session 2
Android accessories session 2Android accessories session 2
Android accessories session 2
 

Recently uploaded

Recently uploaded (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Bluetooth android application For interfacing with arduino

  • 2. CONTENTs 1. Introduction. 2. Bluetooth Basics. 3. Bluetooth Permission. 4. Setting Up Your mobile Bluetooth. 5. Connecting Android phone to Arduino(using Rn42).
  • 3. INTRODUCTION Using the Bluetooth APIs, an Android application can perform the following: •Scan for other Bluetooth devices. •Query the local Bluetooth adapter for paired Bluetooth devices. •Establish RFCOMM channels. •Connect to other devices through discovery. •Transfer data to and from other devices.
  • 4. BLUETOOTH BAsICs All Bluetooth API’s are present in android.bluetooth package. 1.Bluetooth Adapter: It’s the entry-point for all Bluetooth interaction. 2.Bluetooth Device: It is used to  request a connection with a remote device through a BluetoothSocket or query information about the device such as its name, address, class, and bonding state. 3.Bluetooth Socket: This is the connection point that allows an application to exchange data with another Bluetooth device via InputStream and OutputStream.
  • 5. Cont.. 4. Bluetooth Server socket: Represents an open server socket that listens for incoming requests. 5. Bluetooth Class: Describes the general characteristics and capabilities of a Bluetooth device.
  • 6. Bluetooth Permission We need this permission to perform any Bluetooth communication e.g. requesting a connection, accepting a connection and transferring data. If you want your app to initiate device discovery or manipulate Bluetooth settings, you must also declare the BLUETOOTH_ADMIN permission.
  • 8. setting uP the Bluetooth Before your app can communicate over Bluetooth verify that Bluetooth is supported on your mobile. BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();   if(btAdapter==null) { errorExit("Fatal Error", "Bluetooth not support"); } else { if (btAdapter.isEnabled()) { //promt user that the Bluetooth is already On } else { //Prompt user to turn on Bluetooth Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, 1); } }
  • 9. Managing a connection The ConnectThread is a inner class, it passes a message to the Handler which then carries out the required action
  • 11. Handler Allows you to send and process message and runnable object associated with a thread’s Message queue. The main uses of Handler are:1.To schedule messages that can be executed as some point in the future. 2.To Enqueue an action to be performed on a different thread.