How do I use the categories option of the monkey tool?
The relevant portion of my manifest file looks like this:
You're really close. This worked for me:
adb shell monkey -p com.JamesBecwar.test -c android.intent.category.LAUNCHER -vvv 3
I think the problem is that you need to include the Launcher too, because if you don't monkey can't start the program. Don't worry you can put more then one -c param. For example you could do:
adb shell monkey -p com.JamesBecwar.test -c android.intent.category.LAUNCHER -c android.intent.category.MONKEY -vvv 3
and it should work.
As far as I can understand by looking at the Monkey source code is that the -c argument stands for "main-category", it will only work in combination with a main-action. That the -c/main-categories criteria will only work when the monkey tries to start the app with "Implicit Intents" and not "Explicit Intents" within the app.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.MONKEY" />
</intent-filter>
https://android.googlesource.com/platform/development/+/master/cmds/monkey/src/com/android/commands/monkey/Monkey.java