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

Commit cdf7a7c6 authored by Philipp Heckel's avatar Philipp Heckel
Browse files

F-Droid flavor without Firebase; works

parent a6ae5c11
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -34,20 +34,16 @@ android {
        debug {
            minifyEnabled false
            debuggable true
            applicationIdSuffix ".debug"
            versionNameSuffix "-debug"
        }
    }

    flavorDimensions "store"
    productFlavors {
        forPlay {
            dimension "store"
            buildConfigField 'String', 'STORE', '"play"'
        play {
            buildConfigField 'boolean', 'FIREBASE_AVAILABLE', 'true'
        }
        forFDroid {
            dimension "store"
            buildConfigField 'String', 'STORE', '"fdroid"'
        fdroid {
            buildConfigField 'boolean', 'FIREBASE_AVAILABLE', 'false'
        }
    }

@@ -81,7 +77,7 @@ dependencies {
    implementation "com.squareup.okhttp3:okhttp:4.9.2"

    // Firebase, sigh ... (only Google Play)
    forPlayImplementation 'com.google.firebase:firebase-messaging:22.0.0'
    playImplementation 'com.google.firebase:firebase-messaging:22.0.0'

    // RecyclerView
    implementation "androidx.recyclerview:recyclerview:$rootProject.recyclerViewVersion"
+11 −0
Original line number Diff line number Diff line
package io.heckel.ntfy.firebase

class FirebaseMessenger {
    fun subscribe(topic: String) {
        // Dummy to keep F-Droid flavor happy
    }

    fun unsubscribe(topic: String) {
        // Dummy to keep F-Droid flavor happy
    }
}
+5 −0
Original line number Diff line number Diff line
package io.heckel.ntfy.firebase

class FirebaseService {
    // Dummy to keep F-Droid flavor happy
}
+2 −2
Original line number Diff line number Diff line
@@ -53,9 +53,9 @@
            </intent-filter>
        </receiver>

        <!-- Firebase messaging -->
        <!-- Firebase messaging (note that this is empty in the F-Droid flavor) -->
        <service
                android:name=".msg.FirebaseService"
                android:name=".firebase.FirebaseService"
                android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
+0 −2
Original line number Diff line number Diff line
@@ -2,10 +2,8 @@ package io.heckel.ntfy.app

import android.app.Application
import android.content.Context
import com.google.firebase.messaging.FirebaseMessagingService
import io.heckel.ntfy.data.Database
import io.heckel.ntfy.data.Repository
import io.heckel.ntfy.msg.ApiService

class Application : Application() {
    private val database by lazy { Database.getInstance(this) }
Loading