Toggling to your Debug/Diagnostic Activity made easy.
android:taskAffinity=”com.handstandsam.app.diagnostic”
AndroidManifest.xml, Activity declaration, add a taskAffinity property…
<activity
android:name="com.handstandsam.app.diagnostic.DiagnosticActivity"
android:icon="@drawable/ic_launcher_diagnostic"
android:label="Diagnostic"
android:launchMode="singleTask"
android:taskAffinity="com.handstandsam.app.diagnostic"
android:screenOrientation="portrait"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I just had a breakthrough regarding the definition of debug activities in your app. If you specify a different taskAffinity for your debug activity, it’ll show appear in your task launcher like a separate app allowing you to toggle back and forth, making it super easy to jump around.
Thanks to the library Chuck for using this method so I was able to figure out! https://github.com/jgilfelt/chuck/blob/master/library/src/main/AndroidManifest.xml