Skip to content

Instantly share code, notes, and snippets.

View ErikDohmen's full-sized avatar

Erik Dohmen ErikDohmen

View GitHub Profile
@ErikDohmen
ErikDohmen / MainActivit.kt new template without onCreate
Last active November 25, 2021 14:47
Creating notificationChannels and notificationChannelGroups dynamically in flutter (with custom sound)
// do you have a new setup for the MainActivity.kt file with no 'onCreate' method, then use the following setup:
// At the top of the file, we need the following imports
import android.os.Build
import androidx.annotation.NonNull
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.plugin.common.MethodChannel
import android.net.Uri