我应该使用什么样的意图来保存Android设备生成的错误报告

时间:2015-12-21 17:31:28

标签: android android-implicit-intent

在分享由Android设备生成的报告错误时,如何让我的应用程序在应用程序选择器屏幕中列出。可以使用USB调试开发人员选项生成的错误报告。我尝试在数据字段中添加所有mime类型。但我仍然无法在应用选择器中看到我的应用列表。错误报告生成.zip文件和.png文件。所以,我添加了application / *和image / *类型。

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="application/zip" />
    <data android:mimeType="audio/*" />
    <data android:mimeType="image/png" />
    <data android:mimeType="message/*" />
    <data android:mimeType="multipart/*" />
    <data android:mimeType="text/*" />
    <data android:mimeType="video/*" />
</intent-filter>

2 个答案:

答案 0 :(得分:0)

我不是100%,但我相信过滤器中的多个<data android:mimeType="*/*" />条目可能会使您绊倒。为了进行调试,我将从单个Intent.getType()条目开始,并确认您的应用程序出现在选择器中。

如果是,那么您可以检查<activity android:name=".ui.MyActivity" > <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/plain" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SEND_MULTIPLE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter> </activity> 以确定实际发送的MIME类型。从那里,您可以为每个预期类型添加多个过滤器,如http://en.wikipedia.org/wiki/Universally_Unique_Identifier

所示
ERROR 2015-12-21 18:15:24,859 [[my-project].http.request.dispatch.443.41] org.mule.exception.DefaultSystemExceptionStrategy: Caught exception in Exception Strategy: Remote host closed connection during handshake javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:953) ~[?:1.7.0_80]
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) ~[?:1.7.0_80]
        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:889) ~[?:1.7.0_80]
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:102) ~[?:1.7.0_80]
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) ~[?:1.7.0_80]
        at java.io.BufferedInputStream.read(BufferedInputStream.java:254) ~[?:1.7.0_80]
        at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) ~[commons-httpclient-3.1.jar:?]
        at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) ~[commons-httpclient-3.1.jar:?]
        at org.mule.transport.http.HttpServerConnection.readLine(HttpServerConnection.java:245) ~[mule-transport-http-3.7.0.jar:3.7.0]
        at org.mule.transport.http.HttpServerConnection.getRequestLine(HttpServerConnection.java:557) ~[mule-transport-http-3.7.0.jar:3.7.0]
        at org.mule.transport.http.HttpRequestDispatcherWork.run(HttpRequestDispatcherWork.java:67) ~[mule-transport-http-3.7.0.jar:3.7.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_80]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_80]
        at java.lang.Thread.run(Thread.java:745) [?:1.7.0_80] Caused by: java.io.EOFException: SSL peer shut down incorrectly
        at sun.security.ssl.InputRecord.read(InputRecord.java:482) ~[?:1.7.0_80]
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934) ~[?:1.7.0_80]
        ... 13 more

答案 1 :(得分:0)

这似乎可以回答你的问题。它很长,所以我不会在这里复制它。

https://stackoverflow.com/a/16232417

android.intent.action.APP_ERROR似乎是您需要支持来处理ANR /崩溃报告的意图过滤器。