Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Real FM Radio [![Releases](https://img.shields.io/github/downloads/vladislav805/RFM-Radio/total)](https://github.com/vladislav805/RFM-Radio/releases/latest)

I think the right way to make radio work in recent android versions is with https://www.apkmirror.com/apk/lineageos/fm-radio-10/fm-radio-10-13-release/fm-radio-13-android-apk-download/ or https://github.com/iusmac/RevampedFMRadio

Updated SDK and requiered premissions to run on android 14 and 15

Real hardware radio for Android smartphones based on Qualcomm Snapdragon 2xx, 4xx and 6xx processors (up to 625 and 650).

[<img alt="IzzyRepo" src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png" width="176" />](https://apt.izzysoft.de/fdroid/index/apk/com.vlad805.fmradio)
Expand Down
64 changes: 43 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
applicationId dev ? "com.vlad805.fmradio.dev" : "com.vlad805.fmradio"
minSdkVersion 21
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 22
targetSdkVersion 34
//noinspection GroovyAssignabilityCheck
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
//noinspection GroovyAssignabilityCheck
Expand All @@ -36,10 +36,22 @@ android {

//noinspection GroovyMissingReturnStatement
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11 // Or VERSION_17
targetCompatibility JavaVersion.VERSION_11 // Or VERSION_17
}

afterEvaluate {
tasks.withType(JavaCompile).configureEach {
// Emit basic deprecation notes
options.deprecation = true
// Emit full @Deprecated usage details
options.compilerArgs += ['-Xlint:deprecation']
// If you also care about unchecked warnings:
options.compilerArgs += ['-Xlint:unchecked']
}
}


productFlavors {
}
lint {
Expand All @@ -49,33 +61,43 @@ android {

//noinspection GroovyMissingReturnStatement

applicationVariants.all { variant ->
variant.outputs.all {
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "${defaultConfig.applicationId}-${variant.versionName}.apk"
}
}

}

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "com.android.support") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "26.+"
}
}
configurations.configureEach {
resolutionStrategy {
// Force all kotlin standard library artifacts to a consistent version
// Use the version compatible with your androidx libraries (1.8.10 seems likely based on error)
force "org.jetbrains.kotlin:kotlin-stdlib:1.8.10"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.10"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10"

// You can likely remove the old com.android.support rule now
// eachDependency { DependencyResolveDetails details ->
// def requested = details.requested
// if (requested.group == "com.android.support") {
// if (!requested.name.startsWith("multidex")) {
// details.useVersion "26.+"
// }
// }
// }
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.core:core:1.6.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.media:media:1.3.1'
implementation 'com.github.naman14:TAndroidLame:1.1'
implementation 'com.github.atsushi-ageet:tray:0.14.0'
// Example Updates (check for latest stable versions!)
implementation 'androidx.core:core-ktx:1.10.1' // Use ktx version if converting to Kotlin later, or core:1.10.1
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.annotation:annotation:1.6.0'
implementation 'androidx.preference:preference-ktx:1.2.1' // Use ktx version if converting to Kotlin later, or preference:1.2.1
implementation 'androidx.media:media:1.6.0'
implementation 'com.github.naman14:TAndroidLame:1.1' // Check if this still works/is maintained
implementation 'com.github.atsushi-ageet:tray:0.14.0' // Check for updates
}
33 changes: 27 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,23 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Only request legacy read permission up to Android 12L (API 32) -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />

<!-- Only request legacy write permission up to Android 12L (API 32) -->
<!-- Note: For API 30+, this doesn't grant broad write access anyway -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32"
tools:ignore="ScopedStorage" /> <!-- Add ignore for ScopedStorage warning -->

<!-- Request new granular permission for reading audio on Android 13+ -->
<!-- Needed IF the app needs to read audio files it didn't create -->
<!-- Might not be strictly needed if only managing own files/recordings via MediaStore/app-specific dir -->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

<application
android:allowBackup="true"
Expand All @@ -20,7 +34,8 @@
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".activity.MainActivity"
android:label="@string/main_activity_label"
android:exported="true"
android:label="@string/main_activity_label"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand All @@ -38,17 +53,23 @@
<service
android:name=".service.FMService"
android:enabled="true"
android:exported="true"
android:exported="false"
android:label="RFM Main Service"
android:process=":service"
tools:ignore="ExportedService"/>
tools:ignore="ExportedService"
android:foregroundServiceType="mediaPlayback"/>
<!-- tools:ignore="ExportedService" no longer needed if false -->

<receiver android:name=".receivers.CallReceiver" android:enabled="true">
<receiver android:name=".receivers.CallReceiver" android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
</receiver>
</application>

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />

</manifest>
Loading