0

I want to open an subactivity of one application inside another application for that I am doing

Intent intent = new Intent();

    intent.setComponent(new ComponentName("com.android.settings",
                "com.android.settings.audiopreferences.SystemAudioSettings"));

    context.startActivity(intent);

Inside Android Manifest File:

<activity
            android:name="com.android.settings.audiopreferences.SystemAudioSettings"
            android:exported="true"
            android:label="SystemAudioSettings">

        </activity>

if i execute above Im getting the below Exception

id=1: thread exiting with uncaught exception (group=0x40fac930)
E/AndroidRuntime( 2741): FATAL EXCEPTION: main
E/AndroidRuntime( 2741): java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.android.settings/.audiopreferences.SystemAudioSettings } from ProcessRecord{414c0b58 2741:com.dea600.radioapp/u0a10071} (pid=2741, uid=10071) not exported from uid 1000
E/AndroidRuntime
String
  • 3,660
  • 10
  • 43
  • 66

1 Answers1

0

You need to set intent filter for you activity.

See this answer.

Community
  • 1
  • 1
mata
  • 361
  • 3
  • 14