|
|
|
@ -128,6 +128,9 @@ public class MicroPhotoService extends Service {
|
|
|
|
|
private static final String ACTION_IMP_PUBKRY = "com.xypower.mpapp.ACT_IMP_PUBKEY";
|
|
|
|
|
|
|
|
|
|
private static final String ACTION_TAKE_PHOTO_MANUALLY = "com.xypower.mpapp.ACT_TP_M";
|
|
|
|
|
|
|
|
|
|
private static final String ACTION_CAMERA_CTRL = "com.xypower.mpapp.ACT_CAM_CTRL";
|
|
|
|
|
|
|
|
|
|
private static final String ACTION_HEARTBEAT_MANUALLY = "com.xypower.mpapp.ACT_HB_M";
|
|
|
|
|
private static final String ACTION_UPDATE_CONFIGS = "com.xypower.mpapp.ACT_UPD_CFG";
|
|
|
|
|
public static final String ACTION_VIDEO_FINISHED = "com.xypower.mpapp.ACT_V_FINISHED";
|
|
|
|
@ -325,6 +328,7 @@ public class MicroPhotoService extends Service {
|
|
|
|
|
intentFilter.addAction(ACTION_UPDATE_CONFIGS);
|
|
|
|
|
intentFilter.addAction(ACTION_IMP_PUBKRY);
|
|
|
|
|
intentFilter.addAction(ACTION_TAKE_PHOTO_MANUALLY);
|
|
|
|
|
intentFilter.addAction(ACTION_CAMERA_CTRL);
|
|
|
|
|
intentFilter.addAction(ACTION_HEARTBEAT_MANUALLY);
|
|
|
|
|
intentFilter.addAction(ACTION_GPS_TIMEOUT);
|
|
|
|
|
intentFilter.addAction(ACTION_RESTART);
|
|
|
|
@ -559,6 +563,11 @@ public class MicroPhotoService extends Service {
|
|
|
|
|
|
|
|
|
|
Log.i(TAG, "Take Photo CH=" + channel + " PR=" + preset + " Mannually");
|
|
|
|
|
mService.notifyToTakePhoto(mService.mNativeHandle, channel, preset, 0, url, mediaType);
|
|
|
|
|
} else if (TextUtils.equals(ACTION_CAMERA_CTRL, action)) {
|
|
|
|
|
int channel = intent.getIntExtra("channel", 0);
|
|
|
|
|
int preset = intent.getIntExtra("preset", 0);
|
|
|
|
|
int cmd = intent.getIntExtra("cmd", 0);
|
|
|
|
|
mService.sendCameraCtrl(mService.mNativeHandle, channel, preset, cmd);
|
|
|
|
|
} else if (TextUtils.equals(ACTION_UPDATE_CONFIGS, action)) {
|
|
|
|
|
int restart = intent.getIntExtra("restart", 0);
|
|
|
|
|
Log.i(TAG, "UPD CFG Fired ACTION=" + action + " restart=" + restart);
|
|
|
|
@ -1635,6 +1644,9 @@ cellSignalStrengthGsm.getDbm();
|
|
|
|
|
protected native void burstCaptureFinished(long handler, boolean result, int numberOfCaptures, String pathsJoinedByTab, boolean frontCamera, int rotation, long photoId);
|
|
|
|
|
|
|
|
|
|
public static native long takePhoto(int channel, int preset, boolean photoOrVideo, String configFilePath, String path);
|
|
|
|
|
|
|
|
|
|
protected native void sendCameraCtrl(long handler, int channel, int preset, int cmd);
|
|
|
|
|
|
|
|
|
|
public static native void releaseDeviceHandle(long deviceHandle);
|
|
|
|
|
public static native boolean sendExternalPhoto(long deviceHandle, String path, long photoInfo);
|
|
|
|
|
public static native void infoLog(String log);
|
|
|
|
|