Re: [android-developers] Re: call an activity of another package

2016-05-24 Thread TreKing
On Mon, May 23, 2016 at 1:19 AM, Arun Kumar 
wrote:

> i have a package name as well as class name but i cant open that package
> with particular activity...
> How do i done ?
>

Use an intent that the other app has published as an expected interface for
interacting with it. Attempting to launch another activity within another
app by name is a bad idea.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CANCScggoVYThZ_rShC%2BwFk5Pk_9Un9NGj6X8zTPBf22EmHa0uA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: call an activity of another package

2016-05-23 Thread Arun Kumar
friends please kindly help me.. i have a package name as well as class name 
but i cant open that package with particular activity...
How do i done ?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5da8fd51-6e2d-4dcd-98b0-b53b2ab9907e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: call an activity of another package

2009-12-09 Thread nvstp
Thanks very much.
It helps me a lot. [?][?][?][?][?][?]

On Tue, Dec 1, 2009 at 08:30, dane131 orestis...@gmail.com wrote:

 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..



-- 
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=en1E3.gif

[android-developers] Re: call an activity of another package

2009-11-30 Thread jotobjects
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 orestis...@gmail.com 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 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


[android-developers] Re: call an activity of another package

2009-11-30 Thread dane131
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 jotobje...@gmail.com 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 orestis...@gmail.com 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 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