App錯誤報告捕獲工具:Telescope

jopen 9年前發布 | 10K 次閱讀 Telescope Android開發 移動開發

一個簡單的工具能夠輕松在你的App中捕獲Bug報告的工具。

Usage

Place aTelescopeLayoutat the root of your hierarchy.

Add a callback to the view group withsetLens(Lens). Telescope provides two default implementations:

  • EmailLens: Compose an email with the provided addresses and subject (optional).
  • EmailDeviceInfoLens: EnhancesEmailLensby pre-populating the email body with app and device info

Screenshots will be stored on the external storage in/Telescope/com.app.package/. To have Telescope clean up the screenshots folder, callTelescopeLayout.cleanUp(Context). Ideally, this would be called in theonDestroy()method of yourActivityorFragment.

If you are using the Gradle-based build system, you can wrap this view group around your activity layouts only in the debug builds.

Permissions

Pre-KitKat,WRITE_EXTERNAL_STORAGEis required for saving screenshots. Screenshots can be disabled using the configuration options below.

Configuration

The view group can be configured as follows:

  • Set the number of fingers to trigger withapp:pointerCount/setPointerCount(int)
  • Set the progress color withapp:progressColor/setProgressColor(int)
  • Disable screenshots withapp:screenshot/setScreenshot(boolean)
  • Screenshot children only withapp:screenshotChildrenOnly/setScreenshotChildrenOnly(boolean)
  • Set the screenshot target withsetScreenshotTarget(View)
  • Disable vibration withapp:vibrate/setVibrate(boolean)

Download

Download the latest JAR or grab via Gradle:

compile 'com.mattprecious.telescope:telescope:1.4.0@aar'

or Maven:

<dependency>
  <groupId>com.mattprecious.telescope</groupId>
  <artifactId>telescope</artifactId>
  <version>1.4.0</version>
  <type>apklib</type>
</dependency>

項目主頁:http://www.baiduhome.net/lib/view/home/1442239469383

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!