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 7006067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:25:48+00:00 2026-05-27T21:25:48+00:00

I am going one activity to another using an explicit Intent and I declare

  • 0

I am going one activity to another using an explicit Intent and I declare it in the manifest file.

<activity
    android:name=".Activity2"
    android:label="Activity 2">

    <intent-filter
        action android:name="com.tr.ACTIVITY2" 
        category android:name=”android.intent.category.DEFAULT">
    </intent-filter>
</activity>

It works fine but one book uses intent-filter for this and I am confused about when we use intent filter.

  • 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-27T21:25:48+00:00Added an answer on May 27, 2026 at 9:25 pm

    When you use an explicit intent it’s like you tell Android “open Activity2”.

    When you use an implicit intent you tell Android: “open an activity that can do these things“. these things is actually the filter that you write in the manifest for Activity2.

    As an example, if you are in Activity1 and want to start Activity2:

    You can have explicit:

    Intent intent = new Intent(Activity1.this, Activity2.class);
    startActivity(intent);
    

    Or implicit:

    Intent intent = new Intent();
    intent.addAction("myAction");
    intent.addCategory("myCategory");
    startActivity(intent);
    

    And in this case you should have in your manifest file something like:

    <activity android:name=".Activity2">
       <intent-filter>
          <action android:name="myAction"/>
          <category android:name="myCategory"/>
       </intent-filter>
    </activity>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have button of pick image from android gallery in one activity name DrawingActivity.
Right now I'm adding <intent-filter> <action android:name=android.intent.action.SEARCH /> <category android:name=android.intent.category.DEFAULT /> </intent-filter> <meta-data android:name=android.app.searchable
If I try to pass data from one activity to another, but before going
Do you always call finish() on some activity before going to another activity? For
I'm having two button in one activity. One button having onclick event & another
I am going through one of my .R files and by cleaning it up
I have a delete statement that's going against one of my core application tables.
I know this one is going to be a long-shot, but I thought I'd
Hey this is going to be one of those dumb questions. I am trying
I think this is going to be one of those simple-when-you-see-it problems, but it

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.