Does Boot completed broadcast works without launch...
# android
c
Does Boot completed broadcast works without launching application ?, here is my android manifest, I am not keeping activity LAUNCHER filter . I do not see broadcast receiver calls in boot completed
Copy code
<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/Theme.DownloadPOC">
    <activity
        android:name=".MainActivity"
        android:exported="true">
       
    </activity>

    <!-- Declaring broadcast receiver for BOOT_COMPLETED event. -->
    <receiver
        android:name=".DeviceBootUpReceiver"
        android:enabled="true"
        android:exported="false">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>

</application>
😶 6
p
Not kotlin, but did you request boot completed permission?
c
I came to know the reasons why it doesn't work Starting with Android 3.1 all applications, upon installation, are placed in a “*stopped*” state.(This is the same state that the application ends up in after the user force-stops the app from the Settings application.) While in “stopped” state, the application will not run for any reason, except by a manual launch of an activity. (Meaning no `BroadcastReceviers`(
ACTION_PACKAGE_INSTALLED
BOOT_COMPLETED
 etc.) will be invoked, regardless of the event for which they have registered, until the user runs the app manually.) https://nayaneshguptetechstuff.wordpress.com/2014/06/24/receiver-not-working-know-more-about-stopped-state-of-an-application/
391 Views