You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
4.1 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<sample>
<name>BluetoothChat</name>
<group>Connectivity</group>
<package>com.example.android.bluetoothchat</package>
<!-- change minSdk if needed-->
<minSdk>14</minSdk>
<!-- Include additional dependencies here.-->
<!-- dependency>com.google.android.gms:play-services:5.0.+</dependency -->
<strings>
<intro>
<![CDATA[
This application allows two Android devices to carry out two-way text chat over
Bluetooth. It demonstrates all the fundamental Bluetooth API capabilites, such as:
(1) Scanning for other Bluetooth devices
(2) Querying the local Bluetooth adapter for paired Bluetooth devices
(3) Establishing RFCOMM channels/sockets
(4) Connecting to a remote device
(5) Transfering data over Bluetooth
]]>
</intro>
</strings>
<!-- The basic templates have already been enabled. Uncomment more as desired. -->
<template src="base" />
<template src="FragmentView" />
<!-- Include common code modules by uncommenting them below. -->
<common src="logger" />
<common src="activities"/>
<metadata>
<status>PUBLISHED</status>
<categories>Connectivity</categories>
<technologies>Android</technologies>
<languages>Java</languages>
<solutions>Mobile</solutions>
<level>ADVANCED</level>
<icon>screenshots/icon-web.png</icon>
<screenshots>
<img>screenshots/1-launch.png</img>
<img>screenshots/2-devices.png</img>
<img>screenshots/3-chat.png</img>
</screenshots>
<api_refs>
<android>android.bluetooth.BluetoothAdapter</android>
<android>android.bluetooth.BluetoothDevice</android>
<android>android.bluetooth.BluetoothServerSocket</android>
<android>android.bluetooth.BluetoothSocket</android>
</api_refs>
<description>
<![CDATA[
This sample shows how to implement two-way text chat over Bluetooth between two Android devices, using
all the fundamental Bluetooth API capabilities.
]]>
</description>
<intro>
<![CDATA[
This sample should be run on two Android devices at the same time, to establish a two-way chat over
Bluetooth between the devices. Select "Made discoverable" in overflow menu on one device and click
on the Bluetooth icon on the other one, to find the device and establish the connection.
The sample demonstrates the following, using the [Bluetooth API][1]:
1. [Setting up][2] Bluetooth
2. [Scanning][3] for other Bluetooth devices
3. [Querying][4] the local Bluetooth adapter for paired Bluetooth devices
4. [Establishing RFCOMM][5] channels/sockets
5. [Connecting][6] to a remote device
6. [Transfering][7] data over Bluetooth
[1]: http://developer.android.com/guide/topics/connectivity/bluetooth.html
[2]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#Permissions
[3]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#FindingDevices
[4]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#QueryingPairedDevices
[5]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#ConnectingDevices
[6]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#ConnectingAsAClient
[7]: http://developer.android.com/guide/topics/connectivity/bluetooth.html#ManagingAConnection
]]>
</intro>
</metadata>
</sample>