Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 784841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:46:37+00:00 2026-05-14T20:46:37+00:00

I have activity A in package one, and I want to run an intent

  • 0

I have activity A in package one, and I want to run an intent which will up an activity B which is in package two.

How can I do this? Any samples will be welcome.

this is what ive done, and the error i get:

first activity (“MainActivity”) in a package: com.abelski.currencyclient
and second activity(“SecondActivity” in a diffrent package: com.idan.second

now i wanna call from MainActivity to SecondActivity.

ive added this line at the manifest of the MainActivity:

 <activity android:name="com.idan.second.SecondApplicationActivity"></activity>

now in main Activity i got this button which run this line:

Intent intent = new Intent(MainActivity.this,SecondApplicationActivity.class); 

and this is the rror:

04-29 09:20:59.197: ERROR/AndroidRuntime(399): Uncaught handler: thread main exiting due to uncaught exception
04-29 09:20:59.276: ERROR/AndroidRuntime(399): java.lang.NoClassDefFoundError: com.idan.second.SecondApplicationActivity
04-29 09:20:59.276: ERROR/AndroidRuntime(399):     
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:46:38+00:00Added an answer on May 14, 2026 at 8:46 pm

    I am assuming that by “packages” you mean applications.

    We have:
    – ApplicationA with FirstActivity
    – ApplicationB with SecondActivity

    If, in the ApplicationB’s AndroidManifest.xml file, in the declaration of SecondActivity you add an intent filter such as:

    <activity android:name=".SecondActivity">
      <intent-filter>
        <action android:name="applicationB.intent.action.Launch" />
        <category android:name="android.intent.category.DEFAULT" />
      </intent-filter>
    </activity>
    

    You can create an Intent to launch this SecondActivity from the FirstActivity with:

    Intent intent = new Intent("applicationB.intent.action.Launch");
    startActivity(intent);
    

    What this all means is:

    • The SecondActivity has a filter for the intent action of “applicationB.intent.action.Launch”
    • When you create an intent with that action and call ‘startActivity’ the system will find the activity (if any) that responds to it

    The documentation for this is at: https://developer.android.com/reference/android/content/Intent.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: package com.powergroupbd.timer; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.CountDownTimer;
I have class A which extends the Activity class. This class is in package
Booking.java package one.two; import android.app.Activity; import android.database.Cursor; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.SimpleCursorAdapter; import
I have two intent filters for the root activity of my application <activity android:name=.MyActivity
I have created a Android Application with one Activity and package name com.explore <category
I have two fragments in an Activity, In portrait mode the first one (ListFragment)
I have two apps between which I want some data exchanged. As they are
I have two layouts and I am inflating it one after another ,I want
I have this code: package lijap.app.starcraft2counters; import java.io.File; import android.app.Activity; import android.os.Bundle; import android.os.Environment;
Can some one tell me were i am going wrong. i have three activity's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.