1

In Android 4.1 (Jelly Beans) cannot access the APN details. When i try to access the APN details using

final Cursor apnCursor = this.context.getContentResolver().query(Uri.withAppendedPath(Carriers.CONTENT_URI, "current"), null, null, null, null);

In my program I wanna send a mms without using the Intent.

This will return a error saying I don't have write apn permission to access the APN details.

Then I added the following line to android manifest:

<uses-permission android:name="android.permission.WRITE_APN_SETTINGS"/>

this prompt the error permission is only granted to system apps.

So how can I solve this?

4

2 回答 2

1

Send your MMS via the Intent.

For security reasons, you cannot read APN details without WRITE_APN_SETTINGS, and that permission requires your app to be signed by the same signing key that signed the firmware or for your app to be installed on the system partition (e.g., by a rooted device user).

于 2013-03-30T11:22:59.963 回答
0

我认为这是一个编译错误。在我的情况下(我想要相同的权限 WRITE_APN_SETTINGS),在清理项目(Eclipse->project->clean)之后。编译错误提示将消失。

于 2013-03-31T16:07:11.850 回答