Answers for "systemd start service on boot"

2

android start service on boot

<!-- Allows application to receive actions related to rebooting -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<!-- Inside your <application> -->
<receiver
	android:name="com.example.MyBroadcastReceiver"
	android:exported="true"
	android:enabled="true"
    android:installLocation="internalOnly">
	<intent-filter>
		<!-- Handles cold reboot (power off/on) -->
		<action android:name="android.intent.action.BOOT_COMPLETED" />
		<!-- Handles quick restart -->
		<action android:name="android.intent.action.QUICKBOOT_POWERON" />
	</intent-filter>
</receiver>
Posted by: Guest on October-18-2020
0

start systemctl service

sudo systemctl start application.service
Posted by: Guest on May-11-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language