I read and checked how to do this online and from books, but it will not work in my note 3. This is what I did.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hardkore.testapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="18" />
<permission
android:name="com.hardkore.permissions.MY_PERMISSION"
android:protectionLevel="dangerous"
android:label="@string/perm_label"
android:description="@string/perm_desc" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:permission="com.hardkore.permissions.MY_PERMISSION"
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.hardkore.permissions.MY_PERMISSION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
this is the error displayed by logcat
02-15 16:21:32.525: W/ActivityManager(807): mDVFSHelper.acquire()
02-15 16:21:32.525: W/ActivityManager(807): Permission Denial: starting Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.hardkore.testapp/.MainActivity
}
from null (pid=28305, uid=2000) requires com.hardkore.permissions.MY_PERMISSION
02-15 16:21:35.525: W/ActivityManager(807): mDVFSHelper.release()
source
share