michael-cheung-thebus / boot_completed Goto Github PK
View Code? Open in Web Editor NEWplugin to execute dart code after boot with flutter projects
License: Other
plugin to execute dart code after boot with flutter projects
License: Other
package com.example.sooh
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
class BootReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if (intent.action != null) {
if (intent.action !! == Intent.ACTION_BOOT_COMPLETED || intent.action !! == Intent.ACTION_LOCKED_BOOT_COMPLETED) {
val i = Intent(context, MainActivity::class.java);
context.startActivity(i);
}
}
}
}
But when after device reboot then catch "Unfortunately, sooh has stopped"
Hello, I tried to use your package in my app, so then I installed it correctly and a follow the steps which are described in README.md, but I got the following error when I tried to build the apk:
E:\Usuarios\Mauro\Documentos\AndroidStudioProjects\prueba_vibrator\android\app\src\main\kotlin\com\example\pruebavibrator\ExampleApplication.kt: (16, 48): Type mismatch: inferred type is PluginRegistry? but FlutterEngine was expected
I changed the parameter's type to FlutterEngine, but I still am getting errors:
E:\Usuarios\Mauro\Documentos\AndroidStudioProjects\prueba_vibrator\android\app\src\main\kotlin\com\example\pruebavibrator\ExampleApplication.kt: (15, 35): Unresolved reference: FlutterEngine
I hope you can help me. Best regards.
Version 1.2.71 is almost a year old. Please update to 1.3.x.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.