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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:52:22+00:00 2026-06-17T00:52:22+00:00

I have write 2 app, A_app and B_app. In A_app, I want to call

  • 0

I have write 2 app, A_app and B_app.
In A_app, I want to call B_app and launch B_app’s CalledActivity.
But the B_app’s MAINActivity is MainActiity not CalledActivity.
In A_app, I try below code to call B_app:

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.example.bapp","com.example.bapp.BActivity"));
intent.putExtra ("test2abc", "abctest2");
startActivity(intent);

And in B_app’s BActivity has code in onCreate as below:

Bundle params = getIntent().getExtras();
if (params != null) {
    String temp = params.getString ("test2abc");
    Toast.makeText (BActivity.this, temp, Toast.LENGTH_LONG).show();
}

But there are some error as below:

01-10 10:47:16.904: E/AndroidRuntime(8355): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cmp=com.example.bapp/.BActivity (has extras) } from ProcessRecord{418a3788 8355:com.dlink.nas/u0a7} (pid=8355, uid=10007) not exported from uid 10115

I want the B_app is only called directly by A_app without other call it.
How can I fixed it?

  • 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-17T00:52:23+00:00Added an answer on June 17, 2026 at 12:52 am

    You need to add this to the “B_app” Android Manifest under BActivity‘s <activity> node:

     android:exported="true"
    

    So it looks something like:

    <activity android:name=".Bactivity" 
      android:label="@string/b_activity"
      android:exported="true">
    <!--rest of activity node -->
    </activity>
    

    Another way to “export” is by setting an intent-filter (also in manifest):

    <intent-filter>
        <action android:name="myFilter" />
        <category android:name="android.intent.category.DEFAULT" />
     </intent-filter>
    

    Since Android does not allow access to all Activities by default, just the main one.

    To answer your edited question, there is a way to allow apps to call each other’s components without exporting, as shown in this SO answer. You have to add the sharedUserLabel and sharedUserId attributes in the manifest. However, they note that it is not recommended, since it can cause slight changes in operation.

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

Sidebar

Related Questions

guys. I have a strange problem. I try to write unit-tests to web-app. I
I have a library that I wrote for my app but now want to
I want to write an iPhone app - view image app. And I have
I'm writing a simple web app in PHP that needs to have write access
I'm wanting to write a whiteboard app. I have a beginning that renders a
We have a database app that we're beginning to write some new systems for
I have been asked to write a compliment website/service for an iPhone app. The
I'm trying to write my first simple mvc app. I have a Main View
Does anyone have any advice how to write such app? Or maybe knows some
So, there is problem - I have the order to write web-app on Kohana

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.