I am developing a social network framework library for Android, which is irrelevant, but I would like the ability to invoke an Activity that is defined within the library. Does anyone know if this is possible? I've been trying to do this for several days and am falling behind schedule so I'm about to try another method like just creating a class (in the application package) that extends the activity in the library package, however it seems pointless as the library should handle everything on it's own.
My attempts so far are as follows. Please excuse the poor naming convention.
My library is a jar containing package "A". "A" contains another package called "pkgA", which contains an activity class named Act. Fully qualified name is "A.pkgA.Act".
The application is contained in package "B.Test".
The main activity is called "main". Fully qualified name would be "B.Test.main".
I want to invoke Act from main in the fashion
Intent i = new Intent(this, A.pkgA.Act.class);
The manifest file contains an activity element with the fully qualified name for the activity, which looks like this..
<activity android:name="A.pkgA.Act" android:label="ACTIVITY!!!"/>
The IDE doesn't flag an error since it is a valid class that it can locate, but when I try to install it, I get an error saying
Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
I've scoured the net and no one ever seems to have this issue, nor do they ever really mention using activities that are stored in external jar files. Please someone help!!
2 Replies - 6178 Views - Last Post: 05 April 2010 - 04:44 PM
Replies To: [Android] Can I start an activity that is defined in an external libra
Page 1 of 1