• 4
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

In my Flutter app rather than loading the entire app on the screen, I wish to execute a small Dart function in the background as soon as the app receives the Autostart on BOOT_COMPLETED message.

The app should load normally when the user launches it from the launcher, however when the app receives the Autostart on BOOT_COMPLETED message it should just run a small dart function in the background without the app actually loading on the screen.

So far I have used the code from the following git >> https://github.com/oatpano/flutter_boot_startup

However this code will run the entire app on the screen.

I am not a Android developer, so I'm having issues figuring what is exactly going on in the manifest file.

So in the following example I would like to execute the backgroundfunction() only when the app receives the Autostart on BOOT_COMPLETED message

import 'package:flutter/material.dart';

void main() {
   runApp(new MyApp());
}

void backgroundfunction(){
    print("Hello world");
}