Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth SCO on Android 14 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

homerwang
Copy link

Change Note:

  1. Project files update for Android 14, with Android Studio Hedgehog 2023.1.1 Patch 1
  2. Updated BluetoothRecordActivity for:
    i. Verified audio recording via Bluetooth SCO microphone
    ii. Added Record Audio permission request
    iii. Playback when stop recording
    iv. Removed bluetoothButton, setup Bluetooth SCO when onResume()
    v. Save recorded file in internal storage to pass Android 14 security policy

Copy link
Owner

@aahlenst aahlenst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your proposal.

Updating Gradle seems fine. It might make sense to separate that from your other changes because those are unrelated to the actual update.

Regarding your other changes, I am confused. Why did you remove the SCO-related functionality? What is the motivation for playing back the recording?

}
}

repositories {
google()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are at it, it might make sense to remove jcenter() (it no longer exists, see https://jfrog.com/blog/jcenter-sunset/) and mavenLocal() and add mavenCentral() instead.

compile "com.android.support:support-v4:$support_library_version"
compile "com.android.support:appcompat-v7:$support_library_version"
compile "com.android.support:design:$support_library_version"
implementation 'androidx.appcompat:appcompat:1.6.1'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove those other libraries?


defaultConfig {
minSdkVersion 19
targetSdkVersion 22
minSdkVersion 28
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you raise the minSdkVersion? And why to 28, specificially?

sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility 11
targetCompatibility 11
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you raise the Java version to 11?


task wrapper(type: Wrapper) {
gradleVersion = '3.5'
namespace 'com.example.audiorecord'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does that do?

<activity android:name=".AudioRecordActivity">
<activity
android:name=".BluetoothRecordActivity"
android:exported="true">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert. Audio recording, which is demonstrated by AudioRecordActivity, is the easier case. Using Bluetooth is only for people who want it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants