0
나는 2 개의 간단한 프로젝트를 만들었습니다. 는 처음에 나는 명시하는 권한을 넣어 : 안드로이드 내 애플 리케이션 허가
<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>
그리고 두 번째 프로젝트에서
:<uses-permission android:name="com.example.MODULE"/
하지만 두 번째 프로젝트에서 사용-권한을 제거하고 활동을 시작하는 경우 :
를startActivity(new Intent("com.example.graph.SHOW"))
첫 번째 프로젝트 - 아직 시작 중입니다. 하지만 왜? 허가없이 어떻게 시작됩니까? 권한을 사용하여 두 번째 프로젝트를 올바르게 보호하는 방법
이 답변에 추가하려면 OP의 첫 번째 프로젝트는 '의도 filter'을 추가하여 활동을 수출하고있다. 이렇게하면 ** 모든 ** 앱이 활동을 시작할 수 있습니다. –
모든 앱을 제한 할 수 있습니까? 일부 "비밀번호"/ 권한이있는 앱에 대해서만 내 활동을 시작하고 싶습니다. – user1766287
http://developer.android.com/guide/components/intents-filters.html 및 http://developer.android .com/guide/topics/manifest/intent-filter-element.html – ObAt