Skip to content
ZongXian Shen edited this page Jul 10, 2016 · 8 revisions

Get Sample Tool

Make Custom Tool

We should create a new Android Studio project to build our own instrumentation tool.

  • Create a no activity application.

    • Select the form factor Phone and Tablet.
    • Select the minimum SDK API 21 Android 5.0 (Lollipop).
    • Then add no activity to the application.
  • Stop the instant run feature introduced by the new Android Studio (version >= 2).

    • Open the Gradle script build.gradle(Module: app) and remove the line compile 'com.android.support:appcompat-v7:22.2.0'.
    • Do not follow the sync order enforced by Android Studio now.
    • Open the style resource res/values/styles.xml and change the parent value to parent="@android:style/Theme.Holo.Light".
    • Still in res/values/styles.xml, remove the following lines:
      • <item name="colorPrimary">@color/colorPrimary</item>
      • <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
      • <item name="colorAccent">@color/colorAccent</item>
    • Open the Android manifest AndroidManifest.xml and change the android:theme to android:theme="@android:style/Theme.Holo.Light".
    • sync the project now.
  • Import the ProbeDroid API jar.
    Suppose our project path is PATH_WORKSPACE/MyProject.

    • Copy ProbeDroid.jar into PATH_WORKSPACE/MyProject/app/libs.
    • Back to Android Studio and switch to the Project Files panel. The jar can be seen in app/app/libs/ProbeDroid.jar directory.
    • Right click ProbeDroid.jar and select Add as Library.
  • Start to code your own tool.
    Now we can refer to the javadoc for API usage. Also, you can check out the sample tool as the example.

How to Use

How to Contribute

Clone this wiki locally