Skip to content

Commit

Permalink
Merge pull request #404 from Kevin-Hoogendam/#403_auto_start_after_up…
Browse files Browse the repository at this point in the history
…date

#403 also auto start service after app update
  • Loading branch information
ekasetiawans committed Jun 18, 2024
2 parents 43e64b3 + 1b8c906 commit 943e0c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class BootReceiver extends BroadcastReceiver {
@SuppressLint("WakelockTimeout")
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED) || intent.getAction().equals("android.intent.action.QUICKBOOT_POWERON")) {
if (intent.getAction().equals(Intent.ACTION_MY_PACKAGE_REPLACED) || intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED) || intent.getAction().equals("android.intent.action.QUICKBOOT_POWERON")) {
final Config config = new Config(context);
boolean autoStart = config.isAutoStartOnBoot();
if (autoStart) {
Expand Down

0 comments on commit 943e0c6

Please sign in to comment.