Share a Camera Preview Using NFC and Bluetooth
The idea of this project is to allow two or more individuals to quickly join a peer-to-peer network using NFC and Bluetooth. NFC is a good choice because it reduces the number of steps users must complete to create a network. We’ll take advantage of the user-friendly NFC method to pair devices and rely on the NFC-initiated higher-bandwidth Bluetooth network to handle the heavy lifting.
Our sketch will use a recursive program to send an increasingly accurate live camera image from one Android device to another. We’ll pair the two devices via NFC, and establish a Bluetooth connection. We then begin with a camera preview that consists of only one large pixel, which we’ll draw as a rectangle. Each ...
Get Rapid Android Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.