package com.shukria.kiosklauncher;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

import com.shukria.kiosklauncher.ui.MainActivity;

public class startupOnBootUpReceiver extends BroadcastReceiver {
    protected Context context;
    @Override
    public void onReceive(Context context, Intent intent) {
        // Check if the received broadcast is BOOT_COMPLETED
        if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
            // Your logic here, e.g., starting a service or showing a Toast
            Toast.makeText(context, "Device booted up! Receiver triggered.", Toast.LENGTH_SHORT).show();

            // Example: Start an activity or service

            Intent serviceIntent = new Intent(context, MainActivity.class);
            context.startService(serviceIntent);

        }
    }

};


