The class name needs to be fully qualified, i.e. com.android.b.test.

And I am going to assume "com.android.b" is not the real package name you
are using, just an example. :)

On Sun, Nov 1, 2009 at 6:55 PM, tstanly <[email protected]> wrote:

> hi guys,
>
> Now, I have two apk in /data/app which are a.apk and b.apk,
> and I want to invoke b.apk from a.apk,
>
>
> so in the a.apk,
> I used the Intent object to achive:
> ========code===========
>        Intent intent=new Intent("android.intent.action.MAIN");
>        intent.setClassName("com.android.b", "test"); //package name
> and class name
>        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
>                        Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT );
>        startActivity(intent);
>        a.this.finish();
> =======================
> but with error by logcat::
>
> ========error============
> E/AndroidRuntime(  740): android.content.ActivityNotFoundException:
> Unable to fi
> nd explicit activity class {com.android.b/test}; have you declared t
> his activity in your AndroidManifest.xml?
> =======================
>
> so how can I do for that?
> thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to