public void onClick(View v) {
Intent launcher = new Intent().setAction(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME);
Intent ipwebcam =
new Intent()
.setClassName("com.pas.webcam", "com.pas.webcam.Rolling")
.putExtra("cheats", new String[] {
"set(Photo,1024,768)", // set photo resolution to 1024x768
"set(DisableVideo,true)", // Disable video streaming (only photo and immediate photo)
"reset(Port)", // Use default port 8080
"set(HtmlPath,/sdcard/html/)", // Override server pages with ones in this directory
})
.putExtra("hidebtn1", true) // Hide help button
.putExtra("caption2", "Run in background") // Change caption on "Actions..."
.putExtra("intent2", launcher) // And give button another purpose
.putExtra("returnto", new Intent().setClassName(ApiTest.this,ApiTest.class.getName())); // Set activity to return to
startActivity(ipwebcam);
}