Open kelvinforteta opened 3 years ago
override fun registerWith(registry: PluginRegistry?) {
if (!registry!!.hasPlugin("com.tekartik.sqflite.SqflitePlugin")) {
SqflitePlugin.registerWith(registry!!.registrarFor("com.tekartik.sqflite.SqflitePlugin"))
}
}
it is solution :3
Thank you so much, It worked.
@jeancarlos2020 I have some question. I'm already using an Application file in my android project to use a Firebase integration, it file is in Java. There is some place where can see how register the different plugins with Java? I clarify that I have more than one plugin to use in the background location callback
I would appreciate your help please
@ jeancarlos2020 Tengo una pregunta. Ya estoy usando un archivo de aplicación en mi proyecto de Android para usar una integración de Firebase, su archivo está en Java. ¿Hay algún lugar donde pueda ver cómo registrar los diferentes complementos con Java? Aclaro que tengo más de un complemento para usar en la devolución de llamada de ubicación en segundo plano
Agradeceria tu ayuda por favor
You need to check the manufacturer name in the android or ios folder of each added package, these are the ones I use now and it works perfectly
if (!registry!!.hasPlugin("io.flutter.plugins.firebase.database")) {
FirebaseDatabasePlugin.registerWith(registry!!.registrarFor("io.flutter.plugins.firebase.database"))
}
if (!registry!!.hasPlugin("io.flutter.plugins.androidalarmmanager")) {
AndroidAlarmManagerPlugin.registerWith(registry!!.registrarFor("io.flutter.plugins.androidalarmmanager"))
}
if (!registry!!.hasPlugin("com.dexterous.flutterlocalnotifications")) {
FlutterLocalNotificationsPlugin.registerWith(registry!!.registrarFor("com.dexterous.flutterlocalnotifications"))
}
if (!registry!!.hasPlugin("io.flutter.plugins.firebasemessaging")) {
FirebaseMessagingPlugin.registerWith(registry!!.registrarFor("io.flutter.plugins.firebasemessaging"))
}
if (!registry!!.hasPlugin("com.tekartik.sqflite.SqflitePlugin")) {
SqflitePlugin.registerWith(registry!!.registrarFor("com.tekartik.sqflite.SqflitePlugin"))
}
Muchas gracias, funcionó. Good..! @mehdok closing the issue.
Good day, My app keeps crashing anytime I start the background locator -> Stops the background locator -> start the background locator -> crash.
I have this code that registers SQflite plugin
I think the crash is caused by SQflite because anytime it crashes I get this error message _"Unable to create service rekab.app.backgroundlocator.IsolateHolderService: java.lang.IllegalStateException: Plugin key com.tekartik.sqflite.SqflitePlugin is already in use"
Is there a way to prevent SQflite from running more than once when I try to start the background service?
Below is the error from the terminal: