|
|
|
@ -534,23 +534,28 @@ public class MicroPhotoService extends Service {
|
|
|
|
|
registerPhotoTimer(getApplicationContext(), scheduleTime, scheduleTime, timeout, schedules);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// From Native
|
|
|
|
|
public void startRecording(boolean photoOrVideo, int cameraId, long videoId, int duration, int width, int height, int quality, int orientation, String leftTopOsd, String rightTopOsd, String rightBottomOsd, String leftBottomOsd) {
|
|
|
|
|
Context context = getApplicationContext();
|
|
|
|
|
|
|
|
|
|
Intent intent = makeRecordingIntent(context, photoOrVideo, cameraId, videoId, duration, width, height, quality, orientation,
|
|
|
|
|
leftTopOsd, rightTopOsd, rightBottomOsd, leftBottomOsd);
|
|
|
|
|
leftTopOsd, rightTopOsd, rightBottomOsd, leftBottomOsd, null);
|
|
|
|
|
|
|
|
|
|
intent.putExtra("resultType", 2);
|
|
|
|
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
|
|
|
|
|
context.startActivity(intent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Intent makeRecordingIntent(Context context, boolean photoOrVideo, int cameraId, long videoId, int duration, int width, int height, int quality, int orientation, String leftTopOsd, String rightTopOsd, String rightBottomOsd, String leftBottomOsd) {
|
|
|
|
|
public static Intent makeRecordingIntent(Context context, boolean photoOrVideo, int cameraId, long videoId, int duration, int width, int height, int quality, int orientation, String leftTopOsd, String rightTopOsd, String rightBottomOsd, String leftBottomOsd, String path) {
|
|
|
|
|
// Intent intent = new Intent(this, VideoActivity.class);
|
|
|
|
|
Intent intent = photoOrVideo ? new Intent(context, RawActivity.class) : new Intent(context, Camera2VideoActivity.class);
|
|
|
|
|
|
|
|
|
|
intent.putExtra("cameraId", cameraId);
|
|
|
|
|
intent.putExtra("videoId", videoId);
|
|
|
|
|
if (!TextUtils.isEmpty(path)) {
|
|
|
|
|
intent.putExtra("path", path);
|
|
|
|
|
}
|
|
|
|
|
intent.putExtra("duration", duration);
|
|
|
|
|
intent.putExtra("width", width);
|
|
|
|
|
intent.putExtra("height", height);
|
|
|
|
|