我正在尝试在我的 Control 方法中为 smarteyeglass 的相机使用另一个类中的方法,但出现错误。它告诉我类中的方法不能应用于 smarteyeglass.extension.Samplecamera.SamplecameraControl。这是我尝试在相机控制方法中使用的方法的定义。
public DatabaseHelper(Context context) {
super(context, DB_NAME, null, 10);
this.myContext = context;
this.DB_PATH = "/data/data/" + context.getPackageName() + "/" + "databases/";
Log.e("Path 1", DB_PATH);
}
这是我在相机控制类中使用该方法的地方。
case SmartEyeglassControl.Intents.CAMERA_MODE_JPG_STREAM_HIGH_RATE:
if (cameraStarted) {
DatabaseHelper myDbHelper = new DatabaseHelper(SampleCameraControl.this);
try {
myDbHelper.createDataBase();
} catch (IOException ioe) {
throw new Error("Unable to create database");
}
try {
myDbHelper.openDataBase();
} catch (SQLException sqle) {
throw sqle;
}
d = myDbHelper.query("Rota", null, null, null, null, null, null);
if (d.moveToFirst()) {
do {
canvas.drawText("Alınacak Parça " + d.getString(0) + " " + "Raf Adresi:" + d.getString(1), pointBaseX, pointY, paint);
} while (d.moveToNext());
} else {
canvas.drawText("Başlamak için dokun ", pointBaseX, pointY, paint);
}
break;
canvas.drawText("wrong recording type.", pointBaseX, pointY, paint);
}
default:
utils.showBitmap(displayBitmap);