judemanutd / AutoStarter

This library helps bring up the autostart permission manager of a phone to the user so they can add an app to autostart.
MIT License
626 stars 115 forks source link

simple code for check intent is exist #29

Closed captain-miao closed 3 years ago

captain-miao commented 4 years ago
        Intent intent = new Intent();
        intent.setComponent(new ComponentName(packageName, componentName));
        if (intent.resolveActivity(context.getPackageManager()) != null) {
            // the intent is exist
        }
judemanutd commented 4 years ago

thanks @captain-miao , I've added this to the existing roadmap and should be integrated once the v2 is complete

judemanutd commented 3 years ago

Added support for this in https://github.com/judemanutd/AutoStarter/pull/69