oh mate you were right..just fixed this
i.setComponent(new ComponentName
("aexp.share.sharedapp2","aexp.share.sharedapp2.SharedApp2"));
and it worked...thought that the first parameter was a reference to
the package we are in..
On Dec 1, 2:20 am, jotobjects <[email protected]> wrote:
> Looks like you are telling it that class SharedApp2 is in package
> aexp.share.sharedapp1 - which is probably not correct.
>
> Can you include the exception stack for the error in your post?
>
> On Nov 30, 3:40 pm, dane131 <[email protected]> wrote:
>
> > hallo,
>
> > i have an activity named SharedApp1 in the aexp.share.sharedapp1
> > package with the following simple code :
>
> > package aexp.share.sharedapp1;
>
> > import android.app.Activity;
> > import android.content.ComponentName;
> > import android.content.Intent;
> > import android.os.Bundle;
> > import android.view.View;
> > import android.widget.Button;
>
> > public class SharedApp1 extends Activity {
> > /** Called when the activity is first created. */
> > @Override
> > public void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
> > // setContentView(R.layout.main);
> > Button launchButton = new Button(this);
> > launchButton.setText("Launch");
> > setContentView(launchButton);
> > launchButton.setOnClickListener(new View.OnClickListener() {
> > public void onClick(View view) {
> > Intent i = new Intent();
> > i.setComponent(new ComponentName
> > ("aexp.share.sharedapp1","aexp.share.sharedapp2.SharedApp2"));
> > startActivity(i);
> > }
> > } );
>
> > }
>
> > }
>
> > I haven't modified its manifest file and i use an explicit intent in
> > order to call the activity SharedApp2 in the aexp.share.sharedapp2
> > package.But the application closes when i put the launch button (with
> > the relevant error message and the 'force close' button.Please help...
--
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