Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 702c59f8 authored by Sanket Agarwal's avatar Sanket Agarwal Committed by Andre Eisenbach
Browse files

Add MediaBrowser implementaion for A2DP.

MediaBrowser is a way to control playback of any generic media
application and to conform to this framework API the a2dpsink client
uses the same format.

This middleware provides a way to use A2DP via the MediaBrowserService
and a user for A2DP sink should not need to use the raw Bluetooth APIs.

Change-Id: I73b4a51acc469f503286bfd6d33a1766e30fc50d
parent d1fda797
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
# Copyright 2015 Google Inc. All Rights Reserved.

LOCAL_PATH := $(call my-dir)

# Build the application.
include $(CLEAR_VARS)

LOCAL_PACKAGE_NAME := A2dpMediaBrowserService
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform

LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR = $(LOCAL_PATH)/res

LOCAL_PROGUARD_ENABLED := disabled

include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))
+51 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015, 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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.android.a2dpsink.mbs" >

    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21" />

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_ROUTING" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <application
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <meta-data android:name="com.google.android.gms.car.application"
            android:resource="@xml/automotive_app_desc" />

        <meta-data android:name="com.google.android.gms.car.notification.SmallIcon"
            android:resource="@drawable/ic_notification" />

        <service android:name=".A2dpMediaBrowserService" android:exported="true">
            <intent-filter>
                <action android:name="android.media.browse.MediaBrowserService" />
            </intent-filter>
        </service>

        <receiver android:name=".BootCompleteReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

    </application>
</manifest>
+4.05 KiB
Loading image diff...
+4.05 KiB
Loading image diff...
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015, 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.
-->
<resources>
    <style name="AppBaseTheme" parent="android:Theme.Material">
        <item name="android:colorPrimary">#ffff5722</item>
        <item name="android:colorPrimaryDark">#ffbf360c</item>
        <item name="android:colorAccent">#ffff5722</item>
    </style>
</resources>
Loading