Note that there are some explanatory texts on larger screens.

plurals
  1. POLaunch activity on Boot completed and another activity on Mount completion
    text
    copied!<p>This my Androidmanifest.xml </p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.abc.testapp" android:versionCode="1" android:versionName="Pm61" &gt; &lt;uses-sdk android:minSdkVersion="15"/&gt; &lt;uses-permission android:name="android.permission.BLUETOOTH"/&gt; &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt; &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt; &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt; &lt;uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/&gt; &lt;supports-screens android:anyDensity="true" /&gt; &lt;application android:label="@string/app_name" android:debuggable="true" android:largeHeap="true"&gt; &lt;activity android:name="com.abc.testapp.MainClass" android:label="@string/app_name" android:theme="@android:style/Theme.Translucent" android:hardwareAccelerated="true"&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;activity android:name="com.abc.testapp.BootLoad" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" &gt; &lt;/activity&gt; &lt;activity android:name="com.abc.testapp.Rxmain" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:launchMode="singleTask"&gt; &lt;/activity&gt; &lt;receiver android:name="com.abc.testapp.MyReceiver" android:enabled="true"&gt; &lt;intent-filter android:priority="500"&gt; &lt;action android:name= "android.intent.action.BOOT_COMPLETED"/&gt; &lt;action android:name="android.intent.action.MEDIA_MOUNTED"/&gt; &lt;data android:scheme="file" /&gt; &lt;/intent-filter&gt; &lt;/receiver&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>This is my MyReceiver class for broadcasting</p> <pre><code> package com.abc.testapp; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class MyReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(Intent.ACTION_MEDIA_MOUNTED.equals(action)) { Log.d("MYReceiver","Mounting Successfull"); Intent serviceActivity = new Intent(context, Rxmain.class); serviceActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(serviceActivity); } if(Intent.ACTION_BOOT_COMPLETED.equals(action)) { Log.d("MYReceiver","Boot Successfull"); Intent serviceActivity = new Intent(context, BootLoad.class); serviceActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(serviceActivity); } } } </code></pre> <p>My device is stand alone device, only my app will come on boot. </p> <p>I want when boot complete it shall launch BootLoad activity and after MEDIA_MOUNTED it should launch Rxmain Activity. </p> <p>But my bootLoad activity is not coming </p> <p>So I have some doubts in this: </p> <ol> <li>It is working sometimes but sometimes not?</li> </ol> <p>2.what is this Priority in Intent-filter?</p> <ol> <li><p>what this data scheme does?</p></li> <li><p>what I am doing is correct or not?</p></li> </ol> <p>please suggest me</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload