Android应用程序使用android.permission.READ_LOGS - 是不礼貌的?应用程序、不礼貌、Android、android

2023-09-06 02:29:37 作者:占卜星象

我有一个应用程序可从Android Market。 有些用户要求进行调试时,事情没有按预期工作,走出了一条途径。 我一直在寻找到添加菜单项,将显示输出

I have an app that is available from the Android Market. Some users have asked for a way of debugging when things don't work out as expected. I have been looking into adding a menu item that will display the output of


    Process mLogcatProc = null;
    BufferedReader reader = null;
    mLogcatProc = Runtime.getRuntime().exec(
        new String[] {"logcat", "-d", "AndroidRuntime:E BDtN:V *:S" });
    reader = new BufferedReader(new InputStreamReader (mLogcatProc.getInputStream()));
    String line;
    ArrayList listOfLogLines = new ArrayList();
    while ((line = reader.readLine()) != null)
    {
        listOfLogLines.add(line);
    }

基本上我提取日志的部分。*行,我的程序已经被写和错误的Andr​​oidRuntime已经抛出。

Basically I am extracting the parts of the Log.* lines that my app has been writing and the errors that the AndroidRuntime has been throwing.

我有一个工作原型,将显示给用户的日志,我已提取在ListView部分的内容。

I have a working prototype that will display to the user the contents of the part of the log that I have extracted in a ListView.

我将不得不android.permission.READ_LOGS添加到AndroidManifest.xml文件,以便我的应用程序已读取访问日志,这当然将是信息的用户将被提示安装之前。 而问题是,如果这被认为是不礼貌的,危险的或以其他方式与众不同。它会阻止用户安装?

I will have to add android.permission.READ_LOGS to the AndroidManifest.xml file in order for my app to have read access to the log, and this of course will be information that the user will be prompted with before installing. And the question is if this is considered impolite, dangerous or otherwise out of the ordinary. Will it keep users from installing?

推荐答案

我不会安装一个应用程序,这样做。如果你想要的是你自己的日志,您的应用程序可以保持它写入与系统日志沿着自己的私人日志缓冲区。

I wouldn't install an app that did this. If all you want is your own logs, your app can keep its own private log buffer that it writes into along with the system log.

您可能甚至不需要虽然做到这一点:http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html

You may not even need to do this though: http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html