You should use Context.startInstrumentation, instead of adb. For example, from your Activity, run
startInstrumentation(new ComponentName("com.example.aatg.tc.test", "android.test.InstrumentationTestRunner"), null, null);
how can install apk through ADB in android device.
Hi, I have used the below sample code downloaded from a website and it is crashing.
Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage); sendIntent.setType(HTTP.PLAIN_TEXT_TYPE); // "text/plain" MIME type startActivity(sendIntent);
Let me know the possible solution.