I have an application called syncclient with two packages:
net.sktechnology.android.sycnclient
net.sktechnology.android.update

The first is the main package (the one specified in the run
configuration).
I have set up the build path Libraries and Projects so that it
can access the classes in the second package without a problem.

The update package has an Activity called Update.
I would like to be able to start the Update activity from the
syncclient application.

If I install Update as a separate application, I can start the Update
Activity from syncclient since
update has a manifist with the appropriate intent filter for the
Update activity.

If I do not install Update as a separate application, I believe that
only the manifest of
syncclient is used, and it cannot (as far as I can figure out)
reference the
Update Activity which is in a different package.

My quesiton is:
Can you have a single application with two packages and be able to
start activities
from both packages?


On Jan 25, 6:19 pm, Dianne Hackborn <hack...@android.com> wrote:
> How about providing more information? :)  What are the package and class
> names you are actually supplying?  What is the manifest of the app you are
> trying to run?  What is printed in the log when this failure happens?  What
> does Package Browser in Dev Tools show that the system knows about this
> activity you are trying to launch?
>
> On Sun, Jan 25, 2009 at 3:17 PM, info.sktechnol...@gmail.com <
>
>
>
>
>
> info.sktechnol...@gmail.com> wrote:
>
> > OK, I tried that but it did not help.
>
> > Any other suggestions?
>
> > On Jan 25, 2:16 pm, Dianne Hackborn <hack...@android.com> wrote:
> > > If the activity does not define any intent filters in its manifest, make
> > > sure it is accessible to other packages through android:exported="true".
>
> > > On Sun, Jan 25, 2009 at 9:47 AM, info.sktechnol...@gmail.com <
>
> > > info.sktechnol...@gmail.com> wrote:
>
> > > > My application has 2 packages because one is shared with my other
> > > > applications.
> > > > I want to start an activity of the shared package.
> > > > I tried the following:
> > > >   Intent intent = new Intent();
> > > >   intent.setClassName(shardedPackageName,sharedActivityName);
> > > >   startActivity(intent);
>
> > > > It throws an ActivityNotFoundException and suggests that the activity
> > > > might not
> > > > be in the manifest.  But how do I list an acitivity from another
> > > > package in the manifest?
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support.  All such questions should be posted on public
> > > forums, where I and others can see and answer them.- Hide quoted text -
>
> > > - Show quoted text -
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to