SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Android	
  Wi-­‐Fi	
  and	
  Bluetooth	
  

           Jussi	
  Pohjolainen	
  
WI-­‐FI	
  MANAGER	
  
WifiManager	
  
•  WifiManager	
  is	
  able	
  
   –  List	
  current	
  configured	
  networks	
  
   –  Can	
  configure	
  the	
  current	
  ac?ve	
  wi-­‐fi	
  connec?on	
  
   –  Results	
  of	
  access	
  point	
  scans,	
  
•  Needs	
  
   android.permission.ACCESS_WIFI_STATE	
  
Show	
  Wi-­‐Fi	
  Informa?on	
  
WifiManager’s	
  methods	
  
•  addNetwork(WifiConfigura?on	
  wc)	
  
   –  Add	
  a	
  new	
  network	
  descrip?on	
  to	
  the	
  set	
  of	
  
      configured	
  networks.	
  
•  disableNetwork(int	
  netId)	
  
   –  Disable	
  a	
  configured	
  network. 	
  	
  
•  List<WifiConfigura?on>	
  getConfiguredNetworks()	
  
   –  Return	
  a	
  list	
  of	
  all	
  the	
  networks	
  configured	
  in	
  the	
  
      supplicant.	
  
•  See:	
  hTp://developer.android.com/reference/
   android/net/wifi/WifiManager.html	
  
BLUETOOTH	
  API	
  
Android	
  Bluetooth	
  API	
  
•  Wirelessly	
  exchange	
  data	
  with	
  other	
  
   bluetooth	
  devices	
  
•  Possibili?es	
  
   –  Scan	
  other	
  devices	
  
   –  Connect	
  to	
  other	
  devices	
  through	
  discovery	
  
   –  Transfer	
  data	
  
   –  Manage	
  mul?ple	
  connec?ons	
  
   	
  
Bluetooth	
  Permissions	
  
•  In	
  order	
  to	
  use	
  bluetooth	
  features,	
  one	
  must	
  
   declare	
  at	
  least	
  one	
  of	
  the	
  following:	
  	
  
    –  BLUETOOTH	
  
        •  Reques?ng,	
  accep?ng,	
  and	
  transferring	
  data	
  
    –  BLUETOOTH_ADMIN	
  
        •  Device	
  discovery	
  and	
  manipulate	
  bluetooth	
  sengs	
  
Seng	
  Up	
  Bluetooth	
  
Seng	
  Up	
  Bluetooth	
  
Querying	
  Paired	
  Devices	
  
Discovering	
  All	
  Devices	
  
•  To	
  discover	
  use,	
  startDiscovery	
  from	
  
   BluetoothAdapter:	
  
    –  mBluetoothAdapter.startDiscovery();
•  Will	
  return	
  boolean	
  value	
  if	
  the	
  discovering	
  
   started	
  ok.	
  
•  Discovery	
  is	
  asynchronous	
  and	
  last	
  about	
  12	
  
   secs	
  
•  When	
  devices	
  are	
  discovered	
  broadcast	
  
   happens…	
  
Listening	
  to	
  Broadcasts	
  
•  You	
  must	
  create	
  a	
  broadcast	
  receiver	
  that	
  
   listens	
  when	
  devices	
  are	
  discovered	
  
•  Register	
  
       –  IntentFilter filter = new
          IntentFilter(BluetoothDevice.ACTION_FOUND);
       –  registerReceiver(mReceiver, filter);
       –  // Don't forget to unregister during onDestroy
	
  
Broadcast	
  Receiver	
  
// Create a BroadcastReceiver for ACTION_FOUND
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        // When discovery finds a device
        if (BluetoothDevice.ACTION_FOUND.equals(action)) {
            // Get the BluetoothDevice object from the Intent
            BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
            // Add the name and address to an array adapter to show in a ListView
            mArrayAdapter.add(device.getName() + "n" + device.getAddress());
        }
    }
};
Connec?ng	
  
•  You	
  must	
  have	
  a	
  client	
  and	
  a	
  server	
  
•  Use	
  classes	
  BluetoothServerSocket	
  and	
  
   BluetoothSocket
•  Connec?on	
  is	
  done	
  in	
  separate	
  thread	
  
•  You	
  have	
  to	
  have	
  server	
  and	
  client	
  
Server	
  
Client	
  

Mais conteúdo relacionado

Mais procurados

Kangaroo system - send/receive program to/from CNC machine
Kangaroo system - send/receive program to/from CNC machineKangaroo system - send/receive program to/from CNC machine
Kangaroo system - send/receive program to/from CNC machineMirko Mancin
 
Short blutooth present
Short blutooth present Short blutooth present
Short blutooth present syedishaq
 
Mikrotik Hotspot User Manager
Mikrotik Hotspot User ManagerMikrotik Hotspot User Manager
Mikrotik Hotspot User ManagerKHNOG
 
Capitulo 6 v 2 0
Capitulo 6 v 2 0Capitulo 6 v 2 0
Capitulo 6 v 2 0milkux
 
Nagios monitoring with_python_plugin
Nagios monitoring with_python_pluginNagios monitoring with_python_plugin
Nagios monitoring with_python_pluginnndarshan
 
Wi fi protected-access
Wi fi protected-accessWi fi protected-access
Wi fi protected-accessbhanu4ugood1
 
Designing For Voice - #WLPC 10 talk
Designing For Voice - #WLPC 10 talkDesigning For Voice - #WLPC 10 talk
Designing For Voice - #WLPC 10 talkMike Leibovitz
 
Wireless Security null seminar
Wireless Security null seminarWireless Security null seminar
Wireless Security null seminarNilesh Sapariya
 

Mais procurados (19)

Kangaroo system - send/receive program to/from CNC machine
Kangaroo system - send/receive program to/from CNC machineKangaroo system - send/receive program to/from CNC machine
Kangaroo system - send/receive program to/from CNC machine
 
Wireless Cracking using Kali
Wireless Cracking using KaliWireless Cracking using Kali
Wireless Cracking using Kali
 
KRACK attack
KRACK attackKRACK attack
KRACK attack
 
Wireless Network Security
Wireless Network SecurityWireless Network Security
Wireless Network Security
 
Short blutooth present
Short blutooth present Short blutooth present
Short blutooth present
 
Iuwne10 S03 L02
Iuwne10 S03 L02Iuwne10 S03 L02
Iuwne10 S03 L02
 
Mikrotik Hotspot User Manager
Mikrotik Hotspot User ManagerMikrotik Hotspot User Manager
Mikrotik Hotspot User Manager
 
Iuwne10 S02 L07
Iuwne10 S02 L07Iuwne10 S02 L07
Iuwne10 S02 L07
 
Wi fi copy
Wi fi   copyWi fi   copy
Wi fi copy
 
wifi network
wifi networkwifi network
wifi network
 
WPA2
WPA2WPA2
WPA2
 
Capitulo 6 v 2 0
Capitulo 6 v 2 0Capitulo 6 v 2 0
Capitulo 6 v 2 0
 
Nagios monitoring with_python_plugin
Nagios monitoring with_python_pluginNagios monitoring with_python_plugin
Nagios monitoring with_python_plugin
 
Wi fi protected-access
Wi fi protected-accessWi fi protected-access
Wi fi protected-access
 
My home
My homeMy home
My home
 
Iuwne10 S01 L09
Iuwne10 S01 L09Iuwne10 S01 L09
Iuwne10 S01 L09
 
Designing For Voice - #WLPC 10 talk
Designing For Voice - #WLPC 10 talkDesigning For Voice - #WLPC 10 talk
Designing For Voice - #WLPC 10 talk
 
Wpa vs Wpa2
Wpa vs Wpa2Wpa vs Wpa2
Wpa vs Wpa2
 
Wireless Security null seminar
Wireless Security null seminarWireless Security null seminar
Wireless Security null seminar
 

Destaque

Destaque (20)

Android Camera
Android CameraAndroid Camera
Android Camera
 
Android Audio & OpenSL
Android Audio & OpenSLAndroid Audio & OpenSL
Android Audio & OpenSL
 
Android Essential Tools
Android Essential ToolsAndroid Essential Tools
Android Essential Tools
 
Qt Translations
Qt TranslationsQt Translations
Qt Translations
 
C# for Java Developers
C# for Java DevelopersC# for Java Developers
C# for Java Developers
 
Building Web Services
Building Web ServicesBuilding Web Services
Building Web Services
 
Responsive Web Site Design
Responsive Web Site DesignResponsive Web Site Design
Responsive Web Site Design
 
Android Http Connection and SAX Parsing
Android Http Connection and SAX ParsingAndroid Http Connection and SAX Parsing
Android Http Connection and SAX Parsing
 
Android Security, Signing and Publishing
Android Security, Signing and PublishingAndroid Security, Signing and Publishing
Android Security, Signing and Publishing
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
 
Android 2D Drawing and Animation Framework
Android 2D Drawing and Animation FrameworkAndroid 2D Drawing and Animation Framework
Android 2D Drawing and Animation Framework
 
00 introduction-mobile-programming-course.ppt
00 introduction-mobile-programming-course.ppt00 introduction-mobile-programming-course.ppt
00 introduction-mobile-programming-course.ppt
 
Android UI Development
Android UI DevelopmentAndroid UI Development
Android UI Development
 
Android Location and Maps
Android Location and MapsAndroid Location and Maps
Android Location and Maps
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Android Data Persistence
Android Data PersistenceAndroid Data Persistence
Android Data Persistence
 
Android Sensors
Android SensorsAndroid Sensors
Android Sensors
 
Android Multimedia Support
Android Multimedia SupportAndroid Multimedia Support
Android Multimedia Support
 
Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMS
 
Short Intro to Android Fragments
Short Intro to Android FragmentsShort Intro to Android Fragments
Short Intro to Android Fragments
 

Semelhante a Android Wi-Fi Manager and Bluetooth Connection

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 EnergyGabor Paller
 
HyWAI Web Bluetooth API
HyWAI Web Bluetooth APIHyWAI Web Bluetooth API
HyWAI Web Bluetooth APIJonathan Jeon
 
Browser-based Secure Remote Access for the Internet of Things
Browser-based Secure Remote Access for the Internet of ThingsBrowser-based Secure Remote Access for the Internet of Things
Browser-based Secure Remote Access for the Internet of ThingsGünter Obiltschnig
 
Addmi 03-addm prerequisites
Addmi 03-addm prerequisitesAddmi 03-addm prerequisites
Addmi 03-addm prerequisitesodanyboy
 
JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)SMIJava
 
Android accessories session 2
Android accessories session 2Android accessories session 2
Android accessories session 2Sathish Raju
 
Bluetooth android application For interfacing with arduino
Bluetooth android application For interfacing with arduinoBluetooth android application For interfacing with arduino
Bluetooth android application For interfacing with arduinosumit chakraborty
 
Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Amarjeetsingh Thakur
 
FIWARE Primer - Learn FIWARE in 60 Minutes
FIWARE Primer - Learn FIWARE in 60 MinutesFIWARE Primer - Learn FIWARE in 60 Minutes
FIWARE Primer - Learn FIWARE in 60 MinutesFederico Michele Facca
 
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 Minutes
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 MinutesFederico Michele Facca - FIWARE Primer - Learn FIWARE in 60 Minutes
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 MinutesCodemotion
 
Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01nagapriyanka
 
Control Pc Via Bluetooth Enable Mobile
Control Pc Via Bluetooth Enable MobileControl Pc Via Bluetooth Enable Mobile
Control Pc Via Bluetooth Enable MobileSamiul Hoque
 
Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01Controlpcviabluetoothenablemobile 091028150632-phpapp01
Controlpcviabluetoothenablemobile 091028150632-phpapp01ramaswamireddy challa
 
JSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorialJSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorialSoham Sengupta
 
Dynatrace - Red Hat workshop : Monolith to Microservices
Dynatrace - Red Hat workshop : Monolith to MicroservicesDynatrace - Red Hat workshop : Monolith to Microservices
Dynatrace - Red Hat workshop : Monolith to MicroservicesSteve Caron
 
FIWARE IoT Proposal & Community
FIWARE IoT Proposal & CommunityFIWARE IoT Proposal & Community
FIWARE IoT Proposal & CommunityFIWARE
 

Semelhante a Android Wi-Fi Manager and Bluetooth Connection (20)

Android & Beacons
Android & Beacons Android & Beacons
Android & Beacons
 
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
 
HyWAI Web Bluetooth API
HyWAI Web Bluetooth APIHyWAI Web Bluetooth API
HyWAI Web Bluetooth API
 
Browser-based Secure Remote Access for the Internet of Things
Browser-based Secure Remote Access for the Internet of ThingsBrowser-based Secure Remote Access for the Internet of Things
Browser-based Secure Remote Access for the Internet of Things
 
Air superiority for Android Apps
Air superiority for Android AppsAir superiority for Android Apps
Air superiority for Android Apps
 
Addmi 03-addm prerequisites
Addmi 03-addm prerequisitesAddmi 03-addm prerequisites
Addmi 03-addm prerequisites
 
JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)
 
Android accessories session 2
Android accessories session 2Android accessories session 2
Android accessories session 2
 
Bluetooth android application For interfacing with arduino
Bluetooth android application For interfacing with arduinoBluetooth android application For interfacing with arduino
Bluetooth android application For interfacing with arduino
 
citus™ iot ecosystem
citus™ iot ecosystemcitus™ iot ecosystem
citus™ iot ecosystem
 
Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)
 
Eddystone beacons demo
Eddystone beacons demoEddystone beacons demo
Eddystone beacons demo
 
FIWARE Primer - Learn FIWARE in 60 Minutes
FIWARE Primer - Learn FIWARE in 60 MinutesFIWARE Primer - Learn FIWARE in 60 Minutes
FIWARE Primer - Learn FIWARE in 60 Minutes
 
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 Minutes
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 MinutesFederico Michele Facca - FIWARE Primer - Learn FIWARE in 60 Minutes
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 Minutes
 
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
 
JSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorialJSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorial
 
Dynatrace - Red Hat workshop : Monolith to Microservices
Dynatrace - Red Hat workshop : Monolith to MicroservicesDynatrace - Red Hat workshop : Monolith to Microservices
Dynatrace - Red Hat workshop : Monolith to Microservices
 
FIWARE IoT Proposal & Community
FIWARE IoT Proposal & CommunityFIWARE IoT Proposal & Community
FIWARE IoT Proposal & Community
 

Mais de Jussi Pohjolainen

libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferencesJussi Pohjolainen
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationJussi Pohjolainen
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDXJussi Pohjolainen
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript DevelopmentJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDXJussi Pohjolainen
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDXJussi Pohjolainen
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesJussi Pohjolainen
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platformJussi Pohjolainen
 
Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformJussi Pohjolainen
 

Mais de Jussi Pohjolainen (20)

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 
Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha Platform
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Android Wi-Fi Manager and Bluetooth Connection

  • 1. Android  Wi-­‐Fi  and  Bluetooth   Jussi  Pohjolainen  
  • 3. WifiManager   •  WifiManager  is  able   –  List  current  configured  networks   –  Can  configure  the  current  ac?ve  wi-­‐fi  connec?on   –  Results  of  access  point  scans,   •  Needs   android.permission.ACCESS_WIFI_STATE  
  • 5. WifiManager’s  methods   •  addNetwork(WifiConfigura?on  wc)   –  Add  a  new  network  descrip?on  to  the  set  of   configured  networks.   •  disableNetwork(int  netId)   –  Disable  a  configured  network.     •  List<WifiConfigura?on>  getConfiguredNetworks()   –  Return  a  list  of  all  the  networks  configured  in  the   supplicant.   •  See:  hTp://developer.android.com/reference/ android/net/wifi/WifiManager.html  
  • 7. Android  Bluetooth  API   •  Wirelessly  exchange  data  with  other   bluetooth  devices   •  Possibili?es   –  Scan  other  devices   –  Connect  to  other  devices  through  discovery   –  Transfer  data   –  Manage  mul?ple  connec?ons    
  • 8. Bluetooth  Permissions   •  In  order  to  use  bluetooth  features,  one  must   declare  at  least  one  of  the  following:     –  BLUETOOTH   •  Reques?ng,  accep?ng,  and  transferring  data   –  BLUETOOTH_ADMIN   •  Device  discovery  and  manipulate  bluetooth  sengs  
  • 12. Discovering  All  Devices   •  To  discover  use,  startDiscovery  from   BluetoothAdapter:   –  mBluetoothAdapter.startDiscovery(); •  Will  return  boolean  value  if  the  discovering   started  ok.   •  Discovery  is  asynchronous  and  last  about  12   secs   •  When  devices  are  discovered  broadcast   happens…  
  • 13. Listening  to  Broadcasts   •  You  must  create  a  broadcast  receiver  that   listens  when  devices  are  discovered   •  Register   –  IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND); –  registerReceiver(mReceiver, filter); –  // Don't forget to unregister during onDestroy  
  • 14. Broadcast  Receiver   // Create a BroadcastReceiver for ACTION_FOUND private final BroadcastReceiver mReceiver = new BroadcastReceiver() {     public void onReceive(Context context, Intent intent) {         String action = intent.getAction();         // When discovery finds a device         if (BluetoothDevice.ACTION_FOUND.equals(action)) {             // Get the BluetoothDevice object from the Intent             BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);             // Add the name and address to an array adapter to show in a ListView             mArrayAdapter.add(device.getName() + "n" + device.getAddress());         }     } };
  • 15. Connec?ng   •  You  must  have  a  client  and  a  server   •  Use  classes  BluetoothServerSocket  and   BluetoothSocket •  Connec?on  is  done  in  separate  thread   •  You  have  to  have  server  and  client