I am trying to use the VoicemailContract, but I keep getting a permissions error even though I am including the permision in my manifest. Can anyone shed some light on what's going on?
I get this error when trying to access the Voicemail provider:
java.lang.SecurityException: Permission denied for URI: content://com.android.voicemail/voicemail?source_package=com.google.android.apps.googlevoice
Requires com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL permission.
I have added both the following permissions in my manifest:
<uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL" />
<uses-permission android:name="com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL" />
I also am not getting the following broadcast intent:
<receiver
android:name=".VoicemailReceiver"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.NEW_VOICEMAIL" />
</intent-filter>
</receiver>
Any help would be appreciated. THANKS!
It looks like I'll be answering my own question again. I just found this little bit of information that is not included in the Google Documentation for the VoicemailContract:
http://developer.android.com/about/versions/android-4.0.html (scroll down to "Voicemail Provider")
So...basically, even though they have this new API (which is cool and useful), you would only have access to a Voicemail that your app inserted into the DB. You don't have access to any other voicemail that your device has.
I still am not sure if the Broadcast Intent should be fired for all apps on the device or only the system app(s), but since I am not receiving this broadcast, I can only assume that it's for the system app(s) only.
Feel free to confirm or deny this information. Thanks!