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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:01:34+00:00 2026-06-04T11:01:34+00:00

I know you must declare all your Activities and Services in the AndroidManifest.xml file

  • 0

I know you must declare all your Activities and Services in the AndroidManifest.xml file in order to make them accessible to the system (as said in the official docs) but if I have a Service or an Activity that I want to be started only by another Activity in my app, do I need to declare it in the manifest? I.e., I always launch a secondary activity from the primary activity of my app that directly points the secondary activity’s class (no intent filter resolution), is still necessary to declare the secondary activity in the manifest? And what if I don’t want anyone outside my app to be able to launch my secondary activity? I’m sorry if it is a stupid question, I just want to understand if it is a good practice (if possible) to omit activities and services from the manifest file when you want them to be started only by pointing their respective classes within the same app.

  • 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-06-04T11:01:36+00:00Added an answer on June 4, 2026 at 11:01 am

    You must declare all of your activities and services (and everything else like BroadcastReceivers) in the AndroidManifest.xml file.
    You won’t be able to use them otherwise.


    EDIT: As per CommonsWare comment, adding android:exported=”false” to the AndroidManifest.xml’s declaration of the activity would prevent your secondary activity from being launched outside of your application.

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

Sidebar

Related Questions

I know that all members of a POCO class for NHibernate must be defined
I know there must be a really simple answer to this question, but I
2 Questions actually: I know i must use Stored Procedures as much as Possible,
My .NET application (VB.NET 3.5 if you really must know) forms do not properly
I'm just to figure out what does this method do, I know there must
I know that there must be some differences. I have a Silverlight component (
I've installed .net 4 in the server. Now I don't know if I must
I know that in Lisp a list must end with nil, but expression like
I know SQL well but I must be missing something really dumb here. This
I know that GUI code in Java Swing must be put inside SwingUtilities.invokeAndWait or

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.