title: How to automatically enable autostart my apps in Xiaomi Mi4i security menu?
body: <p>My apps if already install, can't start service. If running service must setup in Security Menu and then allow this apps with manual setting. And i want for setup not manual setup but with programmatically in my code service.</p>
  
  <p>My Code,</p>
  
  <ul>
  <li><p>Service</p>
  
  <p>public class MyService extends Service {</p>
  
  <pre><code>@Override
  public void onCreate() {
      super.onCreate();
  }
  
  @Override
  public int onStartCommand(Intent intent, int flags, int startId) {
      Toast.makeText(this, "Service Started...", Toast.LENGTH_LONG).show();
      return Service.START_STICKY;
  }
  
  @Override
  public void onDestroy() {
      Toast.makeText(this, "Service Destroyed...", Toast.LENGTH_LONG).show();
  }
  
  @Nullable
  @Override
  public IBinder onBind(Intent intent) {
      return null;
  }
  </code></pre>
  
  <p>}</p></li>
  <li><p>Android Manifest</p>
  
  <p>
  </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name=".MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;service
          android:name=".MyService"
          android:exported="false"
          android:enabled="true"&gt;
      &lt;/service&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p></li>
  </ul>
  
  <p>Please Help me anyone.. :'(</p>