I have a android toolkit with several Views, Activities, and other useful tools. Then when someone would like to use the toolkit, they create their own application, reference the toolkit and get all the goodies. I’ve gotten this to work for views, but I’m having trouble launching Activities.
Say there is an Activity in the toolkit called BasicHttpServerActivity. How would I launch this activity from a separate application? I’ve tried using intent filters on the toolkit but I keep getting an error. Here is my current setup.
Toolkit MANIFEST
<activity android:name=".BasicHttpServerActivity">
<intent-filter>
<action android:name="com.fs.BasicHttpServerActivity.LAUNCH" />
</intent-filter>
</activity>
Separate application activity launch (attempt)
Intent serverIntent = new Intent("com.fs.BasicHttpServerActivity.LAUNCH");
startActivity(serverIntent);
Logcat says:
04-14 17:16:44.204: ERROR/AndroidRuntime(450): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.fs.BasicHttpServerActivity.LAUNCH }
The other application would need to add the activity to its manifest. There is no “toolkit manifest”.