I'm trying to implement an application with similar functionality to MinimalisticText's ability to launch specific activities upon clicking a widget. I am making an app where I can select any application on the device, and then choose any activity from amongst those and launch it with a button press. However, I've hit the road block of getting an ActivityNotFoundException for not having said activity declared in my manifest.
All of my research has indicated that this is impossible; yet, applications like Minimalistic Text are somehow able to implement the functionality. What am I missing from my application to be able to launch the intents:
Here's the relevant code snippet for how I launch the activity:
private Intent getLaunchIntent(ActivityInfo ainfo) {
Intent launch = new Intent(ctx, ainfo.getClass());
launch.addCategory(Intent.CATEGORY_LAUNCHER);
if(DBG) { Log.i(TAG, "Got launch intent:" + launch.toString()); }
return launch;
}
EDIT: SOLVED! For anyone looking on how to do what I'm doing, look here: