0
votes

I've encountered a strange permission denial in my Android app, here is my manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest package="test.mymax"
    android:versionCode="1"
    android:versionName="1.0" xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-sdk android:minSdkVersion="10" />
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:icon="@drawable/splash"
        android:label="@string/app_name" android:debuggable="true">
        <activity
            android:name=".Test_mymaxActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="A_Info"></activity>
        <activity android:name="A_Info_Refresh"></activity>
        <activity android:name="_TagConnector"></activity>
        <activity android:name="_SQLconnect"></activity>
        <activity android:name="_TagReader"></activity>
        <activity android:name="_TagReader_Refresh"></activity>
        <activity android:name="Test_mymaxActivity"></activity>
    </application>

</manifest>

the error i get is: ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=test.mymax/.Test_mymaxActivity } from null (pid=17572, uid=2000) requires null

Please help I have no idea on what's wrong

3

3 Answers

3
votes

You declared your Test_mymaxActivity twice. Once here

 <activity
        android:name=".Test_mymaxActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
 </activity>

and below a second time

 <activity android:name="Test_mymaxActivity"></activity>
0
votes

Can you post the Intent/Code you are using that is requesting the permission? Or is this immediately on launching your activity?

0
votes

Are you sure you declared all the permission needed for your code (using internet, detect phone state, etc)

Here's the documentation : Manifest permission - Android dev