Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 安卓4.0+;读取发送彩信的APN时出错_Java_Android - Fatal编程技术网

Java 安卓4.0+;读取发送彩信的APN时出错

Java 安卓4.0+;读取发送彩信的APN时出错,java,android,Java,Android,编译发送彩信的代码时出现此错误的原因是什么?为什么我不能阅读Android 4.0及更高版本中的APN?我被直接复制了Commonware给出的答案 这似乎是有意的改变。报告包括以下评论: java.lang.SecurityException: No permission to write APN settings: Neither user 10099 nor current process has android.permission.WRITE_APN_SETTINGS. 可以想到

编译发送彩信的代码时出现此错误的原因是什么?为什么我不能阅读Android 4.0及更高版本中的APN?

我被直接复制了Commonware给出的答案

这似乎是有意的改变。报告包括以下评论:

java.lang.SecurityException: No permission to write APN settings: Neither user 10099 nor   current process has android.permission.WRITE_APN_SETTINGS.

可以想到,你的问题会使他们考虑添加一个单独的读权限,但至少暂时来说,这是一个4.2的回归。

回归是什么意思?所以,在我当前的代码中,我不能读取或写入APN设置,因为这是不允许的?谢谢你的帮助answer@michelle13如果您想阅读Android 4.0+的APN,需要做一些更改。按照我在答案中给出的链接进行操作。
 Since the DB may contain corp passwords, we should secure it. Using the same permission as writing to the DB as the read is potentially as damaging as a write.