Gentlemen, do not tell me? My application uses USB(it is checked to use the default for USB) and now the application turns on when Android loads, Android 4.4 everything works, and in Android 6.0.1 but minimized, and how to make it start up right away unfolded?
Thank.

1 Answers 1

1) Default launcher.
2) Start the Activity from the auto-start service.
  • senks for the answer.But at least some example has already done everything according to the bulky answers, and does not work.

    AndroidManifest.xml

    <?Xml version="1.0" encoding="utf-8"?&Gt;
    <manifest xmlns: android="http://schemas.android.com/apk/res/android"
        package="org.nativescript.b360124.test_wifi">
    
      <uses-permission android: name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    
      <application
            android: allowBackup="true"
            android: icon="@ mipmap/ic_launcher"
            android: label="@ string/app_name"
            android: roundIcon="@ mipmap/ic_launcher_round"
            android: supportsRtl="true"
            android: theme="@ style/AppTheme">
          <receiver
                android: name=".BootCompletedReceiver">
              <intent-filter>
                  <action android: name="android.intent.action.BOOT_COMPLETED"/>
              </intent-filter>
          </receiver>
    
          <activity android: name=".MainActivity">
              <intent-filter>
                  <action android: name="android.intent.action.MAIN"/>
    
                  <category android: name="android.intent.category.LAUNCHER"/>
              </intent-filter>
          </activity>
      </application>
    
    </manifest>


    BootCompletedReceiver.java

    package org.nativescript.b360124.test_wifi;
    
    import android.content.BroadcastReceiver;
    import android.content.Context;
    import android.content.Intent;
    
    public class BootCompletedReceiver extends BroadcastReceiver {
    
        @Override
        public void onReceive(Context context, Intent intent) {
            Intent i=new Intent(context, MainActivity.class);
            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(i);
        }
    }
    – Mysterious Mongoose Apr 15 '19 at 13:01
  • <intent-filter>
    			<action android: name="android.intent.action.MAIN"/>
    			<category android: name="android.intent.category.HOME"/>
    			<category android: name="android.intent.category.DEFAULT"/>
    			</intent-filter>
    – Irritating Yeti Apr 15 '19 at 13:09
  • Irritating Yeti, thanks for registering these categories and now you don’t even have to do a BootCompletedReceiver, the app starts in kiosk mode. – Mysterious Mongoose Apr 17 '19 at 12:00