1

I used to have call persmissions in my app manifest but I recently removed them all. I changed my ACTION_CALL intents for ACTION_DIAL which isn't supposed to ask for any permission. The thing is that the app is still asking for those permissions... So, why could be this happening?

Thanks in advance

EDIT: I've added some code:

Basically this is my AndroidManifest.xml structure:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.my.app"  >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity>
            (...)
        </activity>

        <receiver >
            (...)
        </receiver>

        <activity >
            (...)
        </activity>

        <activity>
            (...)
        </activity>

    </application>

</manifest>

And the source code I've changed in order to avoid using any permission:

    _call.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            if (_phone.getText().length() != 0) {
                String uri = "tel:" + _phone.getText();
                Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(uri));
                startActivity(intent);
            }
        }

    });

I don't know what logcat would be useful for, cause the "error" is that the app ask for the permission when I'm going to install it, not when it is running

fapps
  • 1,799
  • 3
  • 15
  • 18

2 Answers2

1

You need to add this in AndroidManifest.xml

<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />

and use Intent.ACTION_DIAL like you did

here is official doc on permission

related answers

Community
  • 1
  • 1
Saqueib
  • 3,484
  • 3
  • 33
  • 56
  • I think I don't need any , those are for ACTION_CALL not ACTION_DIAL or ACTION_VIEW. Am I wrong? – fapps Feb 09 '15 at 08:33
  • you will need this permission in order to dial a number, give it a try and see – Saqueib Feb 09 '15 at 08:35
  • The issue is that I have no permissions and still works. I've just switched to ACTION_VIEW and keeps working... – fapps Feb 09 '15 at 08:46
0

Please try one of those solutions:

  1. Check all the permission of manifests (of your app and library folder). Some library may require additional permissions. In Android Studio, you should browse the manifests in Project mode (not Packages/Android view mode of left side panel): project_name/src/main/manifest.xml.

  2. If all the manifests are clear, add use-feature with android:required="false" to your manifest of main project. This will tell GP that your app can be installed on devices without telephony, such as tablet.

Like this:

 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.my.app"  >
<uses-feature android:name="android.hardware.telephony" android:required="false"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <activity>
        (...)
    </activity>

    <receiver >
        (...)
    </receiver>

    ...

</application>

  1. Clean and rebuild your project
  2. Last but not least, after uploading new version to Google Play, try to deactivate the old version (in case google play keep both versions).
  3. Ultimately, create new project and drag and drop your source code to new project.
T D Nguyen
  • 7,054
  • 4
  • 51
  • 71
  • I've just in case it could be useful. I have no permissions in my manifest and still asks for them... – fapps Feb 09 '15 at 08:47
  • Well... if the permissions are anywhere in the code I can't found them... The thing is that I wanted to use the dial/view action without permission, which I was using before, so I removed them... but the app still asking for them – fapps Feb 09 '15 at 09:50
  • Well, then i added the final last attempt and I'm done with the thread. – T D Nguyen Feb 09 '15 at 10:16
  • Nothing seem to have worked, so I left the permissions as they were... Thanks for the help anyway! – fapps Feb 09 '15 at 12:30