SlideShare une entreprise Scribd logo
1  sur  17
Mark your agenda for JavaPolis 2006
       December 11th till 15th




JAVAPOLIS
   2006
December 11th till 15th
Bluetooth remote interface for
          JAVA ME
      Breaking digital barriers!


                 Stefano Sanna
                 Researcher
                 CRS4
          www.javapolis.com
Who I am...
• Stefano Sanna is Researcher at CRS4,
  Network Distributed Applications group,
  Mobile Computing team
• Stefano Sanna is technical writer for
  computer magazines “DEV”, “Computer
  Programming” and “Free Software
  Magazine”
• Finally, he is active member of the Java
  Mobile Developers Forum and JUG
  Sardegna
                  www.javapolis.com
Bluetooth in the Java ME world...
• JCP released the “J2ME API for
  Bluetooth” (JSR-82)
• JSR-82 provides:
  – Basic services: discovering, rfcomm
    connection, security
  – OBEX support (optional)
• However...
  – JSR-82 is general purpose (as Socket for
    networking)
                   www.javapolis.com
Blix: the fast way to Bluetooth
interface
• Blix provides a simple API:
  – Client side: set of methods to send events
    related to keyboard, mouse, clipboard, other
    custom commands
  – Server side: well-known observer pattern to
    receive notifications about UI events and
    process custom commands
• Blix is built on top of standard JSR-82
                   www.javapolis.com
Blix Architecture

       Custom                                     Custom
       MIDlet                                   Application
     (controller)                               (controlled)


                                                  events Listener



        BLIX                                        BLIX

JSR-82 Implementation                       JSR-82 Implementation

                        www.javapolis.com
Blix requirements
• Java ME SDK with Bluetooth API support
• Mobile:
  – Java ME device JSR-82 implementation
• Workstation:
  – Any JSR-82 implementation for Java SE
    • Avetana provides free GPL-based version of their
      protocol stack (http://www.avetana.de)



                     www.javapolis.com
Receiving remote controller events
Create the server endpoint
// service number and name
int service = 12;
String name = “My Controller”;

// setup endpoint
BlixEndPoint ep
     = BlixEndPoint.createServer(service, name);


// be ready to listen for events! :-)
ep.setEndPointListener(myListener);


// you are ready to communicate!
                    www.javapolis.com
The EndPointListener interface
 public interface EndPointListener {

     public void connectionEstablished();
     public void connectionLost();

     public   void   keyPressed(int keycode);
     public   void   keyReleased(int keycode);
     public   void   keyTyped(int keycode);
     public   void   keyRepeated(int keycode);
     ...
     public   void snapshotRequested();
     ...
     public   void messageReceived(Message message);

 }

                          www.javapolis.com
Sending remote controller events
Create the client endpoint
// address of server endpoint
String BD_ADDR = “00:11:22:AA:BB:CC”;

// service number assigned to your service
int service = 12;


BlixEndPoint ep;

ep = BlixEndPoint.createClient(BD_ADDR, service);


// you are ready to communicate!


                     www.javapolis.com
BlixEndPoint methods
Invoke them to dispatch event to the
remote device
public void sendKeyPressed(int keycode) {...}

public void sendKeyReleased(int keycode) {...}

public void sendKeyTyped(int keycode) {...}

public void sendKeyRepeated(int keycode) {...}

...

public void sendSnapshot(byte[] image) {...}

// for custom messages:
public void sendMessage(Message message) {...}
                     www.javapolis.com
Simple Bluetooth presenter


                                                  Custom
                                                Application
                                                (controlled)

                                                       Listener



        BLIX                                        BLIX


JSR-82 Implementation                       JSR-82 Implementation
                        www.javapolis.com
AWT strikes back!
• The java.awt.Robot provides methods to
  generate UI events on host machine:
  – Key press & release
  – Mouse move, click and wheel scroll
• We can map mobile phone events to PC
  keyboard:
  – 7 --> PAGE UP
  – 9 --> PAGE DOWN

                   www.javapolis.com
This is the keyTyped method defined by
Using the Robot                     the EndPointListener interface



public void keyTyped(int keycode) {
  switch(keycode) {

    // key 7 on Java ME
    case 55:
      robot.keyPress(KeyEvent.VK_PAGE_UP);
      robot.keyRelease(KeyEvent.VK_PAGE_UP);
      break;

    // key 9 on Java ME
    case 57:
      robot.keyPress(KeyEvent.VK_PAGE_DOWN);
      robot.keyRelease(KeyEvent.VK_PAGE_DOWN);
      break;
    }
}
                    www.javapolis.com
Blix applications
• Support for users with disabilities
• Remote controller for CarPC applications
• Configuration and management for
  embedded devices without UI (vending
  machines, routers...)
• Security controllers: you can hide server
  endpoint and address it directly from your
  remote controller
                  www.javapolis.com
Blix is open source!
• Source code will be available in Jan 2006.
  Check:
  – https://blix.dev.java.net/
• We provide the communication library and
  some sample application. If you intend to
  use Blix for your projects and you like to
  share your experience, please contact us:
  gerda@crs4.it
                     www.javapolis.com
Mark your agenda for JavaPolis 2006
       December 11th till 15th




JAVAPOLIS
   2006
December 11th till 15th

Contenu connexe

Plus de Stefano Sanna

Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018Stefano Sanna
 
Android Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldAndroid Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldStefano Sanna
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017 Stefano Sanna
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in actionStefano Sanna
 
Enlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TVEnlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TVStefano Sanna
 
NFC: tecnologia e applicazioni
NFC: tecnologia e applicazioniNFC: tecnologia e applicazioni
NFC: tecnologia e applicazioniStefano Sanna
 
Android - Programmazione Avanzata
Android -  Programmazione AvanzataAndroid -  Programmazione Avanzata
Android - Programmazione AvanzataStefano Sanna
 
HCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsHCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsStefano Sanna
 
Android & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioniAndroid & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioniStefano Sanna
 
Application Store: opportunita' e trappole
Application Store: opportunita' e trappoleApplication Store: opportunita' e trappole
Application Store: opportunita' e trappoleStefano Sanna
 
Android Bluetooth Hacking
Android Bluetooth HackingAndroid Bluetooth Hacking
Android Bluetooth HackingStefano Sanna
 
Free Software e Open Hardware
Free Software e Open HardwareFree Software e Open Hardware
Free Software e Open HardwareStefano Sanna
 
Playing with Mobile 2.0
Playing with Mobile 2.0Playing with Mobile 2.0
Playing with Mobile 2.0Stefano Sanna
 
Comunicazione Pervasiva
Comunicazione PervasivaComunicazione Pervasiva
Comunicazione PervasivaStefano Sanna
 
Introduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOTIntroduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOTStefano Sanna
 
Sensoristica Avanzata per Dispositivi Mobili
Sensoristica Avanzata per Dispositivi MobiliSensoristica Avanzata per Dispositivi Mobili
Sensoristica Avanzata per Dispositivi MobiliStefano Sanna
 
Introducing the Sun SPOTs
Introducing the Sun SPOTsIntroducing the Sun SPOTs
Introducing the Sun SPOTsStefano Sanna
 

Plus de Stefano Sanna (20)

Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018
 
Android Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldAndroid Things, from mobile apps to physical world
Android Things, from mobile apps to physical world
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in action
 
Enlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TVEnlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TV
 
Introduzione ad NFC
Introduzione ad NFCIntroduzione ad NFC
Introduzione ad NFC
 
NFC: tecnologia e applicazioni
NFC: tecnologia e applicazioniNFC: tecnologia e applicazioni
NFC: tecnologia e applicazioni
 
Android - Programmazione Avanzata
Android -  Programmazione AvanzataAndroid -  Programmazione Avanzata
Android - Programmazione Avanzata
 
HCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsHCIM08 - Mobile Applications
HCIM08 - Mobile Applications
 
Android & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioniAndroid & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioni
 
Application Store: opportunita' e trappole
Application Store: opportunita' e trappoleApplication Store: opportunita' e trappole
Application Store: opportunita' e trappole
 
Android Bluetooth Hacking
Android Bluetooth HackingAndroid Bluetooth Hacking
Android Bluetooth Hacking
 
Android
AndroidAndroid
Android
 
Free Software e Open Hardware
Free Software e Open HardwareFree Software e Open Hardware
Free Software e Open Hardware
 
Playing with Mobile 2.0
Playing with Mobile 2.0Playing with Mobile 2.0
Playing with Mobile 2.0
 
Sun SPOT
Sun SPOTSun SPOT
Sun SPOT
 
Comunicazione Pervasiva
Comunicazione PervasivaComunicazione Pervasiva
Comunicazione Pervasiva
 
Introduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOTIntroduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOT
 
Sensoristica Avanzata per Dispositivi Mobili
Sensoristica Avanzata per Dispositivi MobiliSensoristica Avanzata per Dispositivi Mobili
Sensoristica Avanzata per Dispositivi Mobili
 
Introducing the Sun SPOTs
Introducing the Sun SPOTsIntroducing the Sun SPOTs
Introducing the Sun SPOTs
 

Dernier

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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 StreamsRoshan Dwivedi
 
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 AutomationSafe Software
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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 WorkerThousandEyes
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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...apidays
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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 Scriptwesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Dernier (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Bluetooth remote interface for Java ME

  • 1. Mark your agenda for JavaPolis 2006 December 11th till 15th JAVAPOLIS 2006 December 11th till 15th
  • 2. Bluetooth remote interface for JAVA ME Breaking digital barriers! Stefano Sanna Researcher CRS4 www.javapolis.com
  • 3. Who I am... • Stefano Sanna is Researcher at CRS4, Network Distributed Applications group, Mobile Computing team • Stefano Sanna is technical writer for computer magazines “DEV”, “Computer Programming” and “Free Software Magazine” • Finally, he is active member of the Java Mobile Developers Forum and JUG Sardegna www.javapolis.com
  • 4. Bluetooth in the Java ME world... • JCP released the “J2ME API for Bluetooth” (JSR-82) • JSR-82 provides: – Basic services: discovering, rfcomm connection, security – OBEX support (optional) • However... – JSR-82 is general purpose (as Socket for networking) www.javapolis.com
  • 5. Blix: the fast way to Bluetooth interface • Blix provides a simple API: – Client side: set of methods to send events related to keyboard, mouse, clipboard, other custom commands – Server side: well-known observer pattern to receive notifications about UI events and process custom commands • Blix is built on top of standard JSR-82 www.javapolis.com
  • 6. Blix Architecture Custom Custom MIDlet Application (controller) (controlled) events Listener BLIX BLIX JSR-82 Implementation JSR-82 Implementation www.javapolis.com
  • 7. Blix requirements • Java ME SDK with Bluetooth API support • Mobile: – Java ME device JSR-82 implementation • Workstation: – Any JSR-82 implementation for Java SE • Avetana provides free GPL-based version of their protocol stack (http://www.avetana.de) www.javapolis.com
  • 8. Receiving remote controller events Create the server endpoint // service number and name int service = 12; String name = “My Controller”; // setup endpoint BlixEndPoint ep = BlixEndPoint.createServer(service, name); // be ready to listen for events! :-) ep.setEndPointListener(myListener); // you are ready to communicate! www.javapolis.com
  • 9. The EndPointListener interface public interface EndPointListener { public void connectionEstablished(); public void connectionLost(); public void keyPressed(int keycode); public void keyReleased(int keycode); public void keyTyped(int keycode); public void keyRepeated(int keycode); ... public void snapshotRequested(); ... public void messageReceived(Message message); } www.javapolis.com
  • 10. Sending remote controller events Create the client endpoint // address of server endpoint String BD_ADDR = “00:11:22:AA:BB:CC”; // service number assigned to your service int service = 12; BlixEndPoint ep; ep = BlixEndPoint.createClient(BD_ADDR, service); // you are ready to communicate! www.javapolis.com
  • 11. BlixEndPoint methods Invoke them to dispatch event to the remote device public void sendKeyPressed(int keycode) {...} public void sendKeyReleased(int keycode) {...} public void sendKeyTyped(int keycode) {...} public void sendKeyRepeated(int keycode) {...} ... public void sendSnapshot(byte[] image) {...} // for custom messages: public void sendMessage(Message message) {...} www.javapolis.com
  • 12. Simple Bluetooth presenter Custom Application (controlled) Listener BLIX BLIX JSR-82 Implementation JSR-82 Implementation www.javapolis.com
  • 13. AWT strikes back! • The java.awt.Robot provides methods to generate UI events on host machine: – Key press & release – Mouse move, click and wheel scroll • We can map mobile phone events to PC keyboard: – 7 --> PAGE UP – 9 --> PAGE DOWN www.javapolis.com
  • 14. This is the keyTyped method defined by Using the Robot the EndPointListener interface public void keyTyped(int keycode) { switch(keycode) { // key 7 on Java ME case 55: robot.keyPress(KeyEvent.VK_PAGE_UP); robot.keyRelease(KeyEvent.VK_PAGE_UP); break; // key 9 on Java ME case 57: robot.keyPress(KeyEvent.VK_PAGE_DOWN); robot.keyRelease(KeyEvent.VK_PAGE_DOWN); break; } } www.javapolis.com
  • 15. Blix applications • Support for users with disabilities • Remote controller for CarPC applications • Configuration and management for embedded devices without UI (vending machines, routers...) • Security controllers: you can hide server endpoint and address it directly from your remote controller www.javapolis.com
  • 16. Blix is open source! • Source code will be available in Jan 2006. Check: – https://blix.dev.java.net/ • We provide the communication library and some sample application. If you intend to use Blix for your projects and you like to share your experience, please contact us: gerda@crs4.it www.javapolis.com
  • 17. Mark your agenda for JavaPolis 2006 December 11th till 15th JAVAPOLIS 2006 December 11th till 15th