private final Runnable mCameraButtonAction = new Runnable() {
public void run() {
// Launch the camera intent.
Intent intent;
if( android.os.Build.MODEL.startsWith("HTC") ) {
// TODO: do ALL HTC devices use the same camera classes?
intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.camera", "com.android.camera.CameraEntry");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else if( "Nexus One".equals(android.os.Build.MODEL) ) {
intent = new Intent();
intent.setClassName("com.android.camera", "com.android.camera.Camera");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else {
intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toStr ing());
}
mContext.startActivity(intent);
}
};
public void run() {
// Launch the camera intent.
Intent intent;
if( android.os.Build.MODEL.startsWith("HTC") ) {
// TODO: do ALL HTC devices use the same camera classes?
intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.camera", "com.android.camera.CameraEntry");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else if( "Nexus One".equals(android.os.Build.MODEL) ) {
intent = new Intent();
intent.setClassName("com.android.camera", "com.android.camera.Camera");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else {
intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toStr ing());
}
mContext.startActivity(intent);
}
};