|
|
@ -391,12 +391,13 @@ public class MicroPhotoService extends Service {
|
|
|
|
mService.reloadConfigs(mService.mNativeHandle);
|
|
|
|
mService.reloadConfigs(mService.mNativeHandle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (TextUtils.equals(ACTION_VIDEO_FINISHED, action)) {
|
|
|
|
} else if (TextUtils.equals(ACTION_VIDEO_FINISHED, action)) {
|
|
|
|
|
|
|
|
boolean photoOrVideo = intent.getBooleanExtra("photoOrVideo", false);
|
|
|
|
boolean result = intent.getBooleanExtra("result", false);
|
|
|
|
boolean result = intent.getBooleanExtra("result", false);
|
|
|
|
String path = intent.getStringExtra("path");
|
|
|
|
String path = intent.getStringExtra("path");
|
|
|
|
long videoId = intent.getLongExtra("videoId", 0);
|
|
|
|
long videoId = intent.getLongExtra("videoId", 0);
|
|
|
|
Log.i(TAG, "Recording received(" + Long.toString(videoId) + "):" + path);
|
|
|
|
Log.i(TAG, "Recording received(" + Long.toString(videoId) + "):" + path);
|
|
|
|
|
|
|
|
|
|
|
|
mService.recordingFinished(mService.mNativeHandle, result, path, videoId);
|
|
|
|
mService.recordingFinished(mService.mNativeHandle, photoOrVideo, result, path, videoId);
|
|
|
|
} else if (TextUtils.equals(ACTION_STOP, action)) {
|
|
|
|
} else if (TextUtils.equals(ACTION_STOP, action)) {
|
|
|
|
mService.stopTerminalService();
|
|
|
|
mService.stopTerminalService();
|
|
|
|
} else if (TextUtils.equals(ACTION_IMP_PUBKRY, action)) {
|
|
|
|
} else if (TextUtils.equals(ACTION_IMP_PUBKRY, action)) {
|
|
|
@ -509,7 +510,7 @@ public class MicroPhotoService extends Service {
|
|
|
|
registerPhotoTimer(getApplicationContext(), scheduleTime, scheduleTime, timeout, schedules);
|
|
|
|
registerPhotoTimer(getApplicationContext(), scheduleTime, scheduleTime, timeout, schedules);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void startRecording(int cameraId, long videoId, int duration, int width, int height, int quality, int orientation, String leftTopOsd, String rightTopOsd, String rightBottomOsd, String leftBottomOsd) {
|
|
|
|
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();
|
|
|
|
Context context = getApplicationContext();
|
|
|
|
// Intent intent = new Intent(this, VideoActivity.class);
|
|
|
|
// Intent intent = new Intent(this, VideoActivity.class);
|
|
|
|
Intent intent = makeRecordingIntent(context, cameraId, videoId, duration, width, height, quality, orientation,
|
|
|
|
Intent intent = makeRecordingIntent(context, cameraId, videoId, duration, width, height, quality, orientation,
|
|
|
@ -1203,7 +1204,7 @@ cellSignalStrengthGsm.getDbm();
|
|
|
|
protected native boolean reloadConfigs(long handler);
|
|
|
|
protected native boolean reloadConfigs(long handler);
|
|
|
|
protected native void updatePosition(long handler, double lon, double lat, double radius, long ts);
|
|
|
|
protected native void updatePosition(long handler, double lon, double lat, double radius, long ts);
|
|
|
|
protected native boolean uninit(long handler);
|
|
|
|
protected native boolean uninit(long handler);
|
|
|
|
protected native void recordingFinished(long handler, boolean result, String path, long videoId);
|
|
|
|
protected native void recordingFinished(long handler, boolean photoOrVideo, boolean result, String path, long videoId);
|
|
|
|
public static native long takePhoto(int channel, int preset, boolean photoOrVideo, String configFilePath, String path);
|
|
|
|
public static native long takePhoto(int channel, int preset, boolean photoOrVideo, String configFilePath, String path);
|
|
|
|
public static native void releaseDeviceHandle(long deviceHandle);
|
|
|
|
public static native void releaseDeviceHandle(long deviceHandle);
|
|
|
|
public static native boolean sendExternalPhoto(long deviceHandle, String path);
|
|
|
|
public static native boolean sendExternalPhoto(long deviceHandle, String path);
|
|
|
|