Android我的应用权限

Android我的应用权限,android,Android,我创建了两个简单的项目。 在第一个示例中,我放置了清单许可: <permission android:name="com.example.MODULE" android:label="Example module" android:protectionLevel="dangerous" /> <application android:label="@string/app_name" android:theme="@style/Th

我创建了两个简单的项目。 在第一个示例中,我放置了清单许可:

<permission android:name="com.example.MODULE"
            android:label="Example module"
            android:protectionLevel="dangerous" />
<application android:label="@string/app_name" android:theme="@style/Theme.Sherlock.Light" android:icon="@drawable/ic_launcher">
    <activity android:name="MyActivity"
              android:label="@string/app_name"
              android:exported="true"
              android:excludeFromRecents="true">
<intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <action android:name="com.example.graph.SHOW"/>
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>

第一个项目-它仍然在开始。但是为什么呢?未经允许怎么开始?如何使用权限正确保护我的第二个项目?

启动应用程序不需要权限。您可以运行所有应用程序,而无需向开发人员请求权限。例如,我可以在不询问开发人员的情况下运行此代码(wich启动著名的条形码扫描仪)

Intent intent = new Intent("com.google.zxing.client.android.ENCODE");
intent.putExtra("ENCODE_TYPE", "TEXT_TYPE");
intent.putExtra("ENCODE_DATA", output);
intent.putExtra("ENCODE_FORMAT", "QR_CODE");
intent.putExtra("ENCODE_SHOW_CONTENTS", false);

要添加到您的答案中,OP的第一个项目已通过添加
意图过滤器导出活动。这允许任何应用启动活动。我可以限制任何应用吗?我只允许对具有“密码”/“权限”的应用启动我的活动…阅读并
startActivity(new Intent("com.example.graph.SHOW"))
Intent intent = new Intent("com.google.zxing.client.android.ENCODE");
intent.putExtra("ENCODE_TYPE", "TEXT_TYPE");
intent.putExtra("ENCODE_DATA", output);
intent.putExtra("ENCODE_FORMAT", "QR_CODE");
intent.putExtra("ENCODE_SHOW_CONTENTS", false);