All Projects → androidthings → Sample Bluetooth Audio

androidthings / Sample Bluetooth Audio

Licence: apache-2.0
Bluetooth A2DP sample using Android Things

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Sample Bluetooth Audio

android-things-samples
Samples and projects for platforms running Android Things
Stars: ✭ 23 (-84.25%)
Mutual labels:  android-things
Androidthings rainbowhatdemo
This Android Things project executes all the hardware that is on the Pimoroni Rainbow HAT for Android Things and Raspberry Pi 3
Stars: ✭ 17 (-88.36%)
Mutual labels:  android-things
Surviving With Android
Source code related to the posts in the blog
Stars: ✭ 1,275 (+773.29%)
Mutual labels:  android-things
Doorbell
Cloud-based photo doorbell with companion app
Stars: ✭ 298 (+104.11%)
Mutual labels:  android-things
Sample Tensorflow Imageclassifier
Classify camera images locally using TensorFlow models
Stars: ✭ 623 (+326.71%)
Mutual labels:  android-things
Androidthings Googleassistant
Integrate Google Assistant into Android Things
Stars: ✭ 28 (-80.82%)
Mutual labels:  android-things
native-libandroidthings
NDK library for exposing Peripheral I/O APIs in C/C++
Stars: ✭ 28 (-80.82%)
Mutual labels:  android-things
Sample Simpleui
Connect GPIO states with a graphical UI on Android Things
Stars: ✭ 116 (-20.55%)
Mutual labels:  android-things
Libaums
Open source library to access USB Mass Storage devices on Android without rooting your device
Stars: ✭ 769 (+426.71%)
Mutual labels:  android-things
Sample Usbenum
Discover connected devices using the Android USB Host APIs
Stars: ✭ 81 (-44.52%)
Mutual labels:  android-things
Lantern
Transform any surface into mixed-reality using Raspberry Pi, a laser projector, and Android Things.
Stars: ✭ 403 (+176.03%)
Mutual labels:  android-things
Contrib Drivers
Open source peripheral drivers
Stars: ✭ 539 (+269.18%)
Mutual labels:  android-things
Androidthings Drivers
Android Things open source peripheral drivers
Stars: ✭ 30 (-79.45%)
Mutual labels:  android-things
New Project Template
Stars: ✭ 265 (+81.51%)
Mutual labels:  android-things
Android Robocar
Build your own robocar, remote-controlled or autonomous, with Android Things.
Stars: ✭ 95 (-34.93%)
Mutual labels:  android-things
sample-uartloopback
Echo received characters over a UART with Android Things
Stars: ✭ 71 (-51.37%)
Mutual labels:  android-things
Awesome Android Things
A curated list of awesome android things tutorials, libraries and much more at one place
Stars: ✭ 883 (+504.79%)
Mutual labels:  android-things
Android Things Electricity Monitor
Electricity Monitor using Android Things and Firebase Realtime Database
Stars: ✭ 118 (-19.18%)
Mutual labels:  android-things
Sample Button
Basic input and output using a button and LED
Stars: ✭ 107 (-26.71%)
Mutual labels:  android-things
Android Sitemap
👓 Every link ever to Android Developer site.
Stars: ✭ 61 (-58.22%)
Mutual labels:  android-things

Bluetooth Audio

This sample demonstrates the use of Android Bluetooth APIs for audio from an Android Things app.

Introduction

This sample demonstrates how to enable an A2DP sink on your Android Things device and control lifecycle events, such as pairing, connection and playback so that other devices, like a phone, can connect and play audio in your Android Things device.

Screenshots

Bluetooth Audio sample demo

(Watch the demo on YouTube)

Pre-requisites

  • Android Things compatible board
  • Android Studio 2.2+
  • (optional) a speaker or headsets, so that you can listen to the audio and notifications.
  • (optional) Two buttons connected to the GPIO pins, so that you can control the sample at runtime. Without the buttons, you can use a keyboard or adb. For more on this, look at the main activity, where the supported commands are described.

Build and install

On Android Studio, click on the "Run" button.

If you prefer to run on the command line, type

./gradlew installDebug
adb shell am start com.example.androidthings.bluetooth.audio/.A2dpSinkActivity

Note: If you connect an audio source to an Android Things audio sink (eg this sample) but you can't hear your media playing through the audio jack, check if you have an HDMI display connected. If so, the audio will be routed to the HDMI output.

Enable auto-launch behavior

This sample app is currently configured to launch only when deployed from your development machine. To enable the main activity to launch automatically on boot, add the following intent-filter to the app's manifest file:

<activity ...>

    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.HOME"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>

</activity>

License

Copyright 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].