I want to start my app automatically at boot of android device ,is there any package or any solution for doing this , i have found it in native android code but how it is possible in flutter please help.
Asked
Active
Viewed 258 times
2
-
1You can follow this link: https://stackoverflow.com/a/6392009/13109852 – Salih Can Feb 03 '22 at 05:40
-
exactly but how to do that in flutter – appdev Feb 03 '22 at 05:42
-
Actually you can do it exactly as in the answer. You just have to change "com.myapp.MyService" to your own. Finally, you should update the name "MyService.class" to "MyActivity.class". – Salih Can Feb 03 '22 at 06:04
-
'onReceive' hides member of supertype 'BroadcastReceiver' and needs 'override' modifier. getting this error – appdev Feb 03 '22 at 07:45
-
You should add @Override annotation top of onReceive method, if you already added you could add more code in your post. – Salih Can Feb 03 '22 at 11:20
-
yeah that error is gone now ....the app runs fine... but i dont know why but it is not working – appdev Feb 04 '22 at 04:17
1 Answers
0
This is not possible using flutter or any native code now , due to security reasons, only apps that belong to google service are run at boot and android versions after 5 dont support this .
appdev
- 72
- 1
- 9