임시
This commit is contained in:
12
.idea/misc.xml
generated
12
.idea/misc.xml
generated
@@ -43,11 +43,23 @@
|
||||
<entry key="..\:/QTagger/a/QTagger_Android1/app/src/main/res/layout/fragment_select.xml" value="0.39739583333333334" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android1/app/src/main/res/layout/fragment_setting.xml" value="0.5536458333333333" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android1/app/src/main/res/layout/fragment_shot.xml" value="0.5" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/bg_indicator_active.xml" value="0.4055" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/bg_indicator_inactive.xml" value="0.4055" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/btn_bg_ex.xml" value="0.316" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/button_camera_shot_background.xml" value="0.4055" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/button_list_background.xml" value="0.316" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/button_normal_background.xml" value="0.4055" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/database_setting_item_background.xml" value="0.4055" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/nuclide_item_background.xml" value="0.4055" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/spinner_background.xml" value="0.4055" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/drawable/sync_low_button_background.xml" value="0.4045" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_account_add.xml" value="0.40625" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_camera.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_db_setting.xml" value="0.40625" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_main.xml" value="0.40625" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_more.xml" value="0.40625" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_permission_checker.xml" value="0.3848958333333333" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_sync.xml" value="0.40625" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_test2.xml" value="0.40625" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_info.xml" value="0.40625" />
|
||||
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_photograph.xml" value="0.40625" />
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
"variantName": "debug",
|
||||
"isDebuggableEnabled": true,
|
||||
"validAbiList": [
|
||||
"ARM64_V8A"
|
||||
"ARMEABI_V7A",
|
||||
"ARM64_V8A",
|
||||
"X86",
|
||||
"X86_64"
|
||||
],
|
||||
"buildTargetSet": [
|
||||
"opencv_jni_shared"
|
||||
@@ -125,7 +128,6 @@
|
||||
"rootBuildGradleFolder": "D:\\QTagger\\a\\QTagger_Android10",
|
||||
"sdkFolder": "C:\\Users\\lee\\AppData\\Local\\Android\\Sdk",
|
||||
"isBuildOnlyTargetAbiEnabled": true,
|
||||
"ideBuildTargetAbi": "arm64-v8a,armeabi-v7a,armeabi",
|
||||
"isCmakeBuildCohabitationEnabled": false,
|
||||
"isPrefabEnabled": false
|
||||
},
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# C/C++ build system timings
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 16ms
|
||||
[gap of 28ms]
|
||||
create_cxx_tasks completed in 44ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 15ms
|
||||
create_cxx_tasks completed in 15ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 16ms
|
||||
create_cxx_tasks completed in 17ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 15ms
|
||||
create_cxx_tasks completed in 15ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 14ms
|
||||
create_cxx_tasks completed in 14ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 18ms
|
||||
create_cxx_tasks completed in 19ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 18ms
|
||||
create_cxx_tasks completed in 19ms
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 15ms
|
||||
create_cxx_tasks completed in 16ms
|
||||
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 13ms
|
||||
create_cxx_tasks completed in 14ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 18ms
|
||||
create_cxx_tasks completed in 19ms
|
||||
|
||||
@@ -8,3 +8,8 @@ create_cxx_tasks
|
||||
create-initial-cxx-model 16ms
|
||||
create_cxx_tasks completed in 17ms
|
||||
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 22ms
|
||||
create_cxx_tasks completed in 23ms
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 15ms
|
||||
create_cxx_tasks completed in 16ms
|
||||
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 15ms
|
||||
create_cxx_tasks completed in 16ms
|
||||
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 16ms
|
||||
create_cxx_tasks completed in 16ms
|
||||
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 15ms
|
||||
create_cxx_tasks completed in 15ms
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# C/C++ build system timings
|
||||
create_cxx_tasks
|
||||
create-initial-cxx-model 15ms
|
||||
create_cxx_tasks completed in 16ms
|
||||
|
||||
@@ -46,8 +46,8 @@ dependencies {
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.github.bumptech.glide:glide:4.9.0'
|
||||
implementation 'com.ramotion.foldingcell:folding-cell:1.2.3'
|
||||
implementation files('C:\\lib\\jdbc\\ojdbc6.jar')
|
||||
implementation project(path: ':OpenCV')
|
||||
implementation files('libs\\ojdbc6.jar')
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
||||
BIN
app/libs/ojdbc6.jar
Normal file
BIN
app/libs/ojdbc6.jar
Normal file
Binary file not shown.
@@ -35,6 +35,9 @@
|
||||
android:theme="@style/Theme.QTagger"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".Activity.DbSettingActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Activity.PermissionChecker"
|
||||
android:exported="true">
|
||||
@@ -43,10 +46,7 @@
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".Activity.CameraActivity"
|
||||
android:exported="false" />
|
||||
@@ -96,9 +96,7 @@
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="false">
|
||||
|
||||
</activity>
|
||||
android:exported="false"></activity>
|
||||
|
||||
<service android:name=".util.SerialService" />
|
||||
</application>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.qtagger.Activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.qtagger.R;
|
||||
import com.qtagger.util.DataManager;
|
||||
|
||||
public class DbSettingActivity extends AppCompatActivity {
|
||||
DataManager dataManager = DataManager.getInstance();
|
||||
EditText edit_ip,edit_port,edit_sid;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_db_setting);
|
||||
|
||||
edit_ip = findViewById(R.id.edit_ip);
|
||||
edit_port = findViewById(R.id.edit_port);
|
||||
edit_sid = findViewById(R.id.edit_sid);
|
||||
|
||||
edit_ip.setText(dataManager.connectionString.getHost());
|
||||
edit_port.setText(dataManager.connectionString.getPort());
|
||||
edit_sid.setText(dataManager.connectionString.getSid());
|
||||
|
||||
|
||||
findViewById(R.id.imageFilterButton_Back).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
findViewById(R.id.button_Cancel).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.button_OK).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//빈공간 체크하고
|
||||
if(edit_ip.getText().toString().isEmpty() ||
|
||||
edit_port.getText().toString().isEmpty() ||
|
||||
edit_sid.getText().toString().isEmpty() )
|
||||
{
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(DbSettingActivity.this);
|
||||
builder.setTitle("알림").setMessage("데이터를 모두 입력해주세요.");
|
||||
builder.setPositiveButton("확인", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
}
|
||||
});
|
||||
android.app.AlertDialog alertDialog = builder.create();
|
||||
alertDialog.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
dataManager.connectionString.setHost(edit_ip.getText().toString());
|
||||
dataManager.connectionString.setPort(edit_port.getText().toString());
|
||||
dataManager.connectionString.setSid(edit_sid.getText().toString());
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import android.widget.Toast;
|
||||
|
||||
import com.qtagger.Data.TestEnum;
|
||||
import com.qtagger.R;
|
||||
import com.qtagger.test;
|
||||
import com.qtagger.util.DataManager;
|
||||
import com.qtagger.util.OracleQueryStr;
|
||||
|
||||
@@ -44,6 +45,21 @@ public class MoreActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.Item_Setting).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getApplicationContext(), DbSettingActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.Item_Upload).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.Item_DBSync).setOnClickListener(new View.OnClickListener() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@Override
|
||||
@@ -86,82 +102,20 @@ public class MoreActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.Item_ExcelExport).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//Excel 출력
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
TextView textViewId = findViewById(R.id.TextView_Id);
|
||||
TextView textViewName = findViewById(R.id.TextView_Name);
|
||||
|
||||
textViewId.setText(dataManager.loginAccount.getAccountId());
|
||||
textViewName.setText(dataManager.loginAccount.getAccountName());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
private void OracleGet(TestEnum testEnum){
|
||||
if(testEnum == TestEnum.선택안함)
|
||||
return;
|
||||
|
||||
Connection conn = null;
|
||||
PreparedStatement psmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
String url = "jdbc:oracle:thin:@1.245.98.188:1521:orcl";
|
||||
String id = "optima_admin";
|
||||
String pw = "optima_admin";
|
||||
try {
|
||||
// 3. JDBC 드라이버 로딩
|
||||
Class.forName("oracle.jdbc.driver.OracleDriver");
|
||||
|
||||
// 4. 접속
|
||||
// - Connection 객체 생성 + 접속 작업.
|
||||
conn = DriverManager.getConnection(url, id, pw);
|
||||
|
||||
// 5. SQL
|
||||
String sql = OracleQueryStr.GetEnumQuery(testEnum);
|
||||
|
||||
psmt = conn.prepareStatement(sql);
|
||||
rs = psmt.executeQuery();
|
||||
if(rs != null) {
|
||||
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
int columnCount = rsmd.getColumnCount();
|
||||
List<String> columnList = new ArrayList<>();
|
||||
String insertTitle = "";
|
||||
|
||||
for(int i=1; i<=columnCount; i++) {
|
||||
String checkStr = rsmd.getColumnName(i);
|
||||
if(!checkStr.equals("MAX_REVISION")) {
|
||||
columnList.add(checkStr);
|
||||
}
|
||||
}
|
||||
|
||||
insertTitle = "INSERT or REPLACE INTO "+testEnum.label()+" ("+String.join("," ,columnList) + ") VALUES(";
|
||||
|
||||
while (rs.next()) {
|
||||
|
||||
|
||||
List<String> valueList = new ArrayList<>();
|
||||
for (String title:
|
||||
columnList) {
|
||||
String value = rs.getString(title);
|
||||
if(value == null) {
|
||||
valueList.add(rs.getString(title));
|
||||
}
|
||||
else
|
||||
{
|
||||
valueList.add("'"+rs.getString(title)+"'");
|
||||
}
|
||||
|
||||
}
|
||||
String insertSql = insertTitle + String.join(",",valueList) + ")";
|
||||
dataManager.dbHelper.insertQuery(insertSql);
|
||||
}
|
||||
}
|
||||
// 6. 접속종료
|
||||
conn.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,8 +187,26 @@ public class SyncActivity extends AppCompatActivity {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
//전체 선택
|
||||
findViewById(R.id.button_allSelect).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
for (int i=0;i<adapter.getCount();i++)
|
||||
{
|
||||
listPkg.setItemChecked(i,true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
findViewById(R.id.button_offSelect).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
for (int i=0;i<adapter.getCount();i++)
|
||||
{
|
||||
listPkg.setItemChecked(i,false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@@ -200,9 +218,9 @@ public class SyncActivity extends AppCompatActivity {
|
||||
PreparedStatement psmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
String url = "jdbc:oracle:thin:@1.245.98.188:1521:orcl";
|
||||
String id = "optima_admin";
|
||||
String pw = "optima_admin";
|
||||
String url = dataManager.connectionString.getUrl();
|
||||
String id = dataManager.connectionString.getDbId();
|
||||
String pw = dataManager.connectionString.getDbPw();
|
||||
try {
|
||||
// 3. JDBC 드라이버 로딩
|
||||
Class.forName("oracle.jdbc.driver.OracleDriver");
|
||||
@@ -251,9 +269,9 @@ public class SyncActivity extends AppCompatActivity {
|
||||
PreparedStatement psmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
String url = "jdbc:oracle:thin:@1.245.98.188:1521:orcl";
|
||||
String id = "optima_admin";
|
||||
String pw = "optima_admin";
|
||||
String url = dataManager.connectionString.getUrl();
|
||||
String id = dataManager.connectionString.getDbId();
|
||||
String pw = dataManager.connectionString.getDbPw();
|
||||
try {
|
||||
// 3. JDBC 드라이버 로딩
|
||||
Class.forName("oracle.jdbc.driver.OracleDriver");
|
||||
|
||||
@@ -29,6 +29,9 @@ import java.util.List;
|
||||
public class TestSelectActivity extends AppCompatActivity {
|
||||
private final DataManager dataManager = DataManager.getInstance();
|
||||
|
||||
private final long FINISH_INTERVAL_TIME = 2000;
|
||||
private long backPressedTime = 0;
|
||||
|
||||
private static final int REQUESTR_IMAGE_CAPTURE = 1;
|
||||
private static final int SINGLE_PERMISSION = 1004;
|
||||
private String imageFilePath;
|
||||
@@ -108,7 +111,7 @@ public class TestSelectActivity extends AppCompatActivity {
|
||||
if(CommonHelper.ft232rChecker(this) == null){
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this);
|
||||
|
||||
builder.setTitle("미연결 알림").setMessage("USB 연결을 진행해야\n서비스 정상 이용이 가능합니다.");
|
||||
builder.setTitle("알림").setMessage("USB 연결이 되어야만\n서비스 정상 이용이 가능합니다.");
|
||||
builder.setPositiveButton("확인", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
@@ -116,8 +119,10 @@ public class TestSelectActivity extends AppCompatActivity {
|
||||
});
|
||||
android.app.AlertDialog alertDialog = builder.create();
|
||||
alertDialog.show();
|
||||
return;
|
||||
}
|
||||
else if(CommonHelper.CheckUsbPermission(this))
|
||||
|
||||
if(CommonHelper.CheckUsbPermission(this))
|
||||
{
|
||||
Toast.makeText(this, "권한이 없습니다.", Toast.LENGTH_SHORT).show();
|
||||
CommonHelper.usbDevicePermission(this);
|
||||
@@ -130,4 +135,19 @@ public class TestSelectActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
long tempTime = System.currentTimeMillis();
|
||||
long intervalTime = tempTime - backPressedTime;
|
||||
|
||||
if (0 <= intervalTime && FINISH_INTERVAL_TIME >= intervalTime) {
|
||||
super.onBackPressed();
|
||||
} else {
|
||||
backPressedTime = tempTime;
|
||||
Toast.makeText(this, "한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.qtagger.Data;
|
||||
|
||||
public class OracleConnectionString {
|
||||
String host;
|
||||
String port;
|
||||
String sid;
|
||||
String dbId;
|
||||
String dbPw;
|
||||
|
||||
public String getUrl(){
|
||||
return "jdbc:oracle:thin:@"+host + ":"+port+":" + sid;
|
||||
}
|
||||
|
||||
public OracleConnectionString() {
|
||||
host = "1.245.98.188";
|
||||
port = "1521";
|
||||
sid = "orcl";
|
||||
dbId = "optima_admin";
|
||||
dbPw = "optima_admin";
|
||||
}
|
||||
|
||||
public OracleConnectionString(String host, String port, String sid, String dbId, String dbPw) {
|
||||
this.host = host;
|
||||
this.port = port;
|
||||
this.sid = sid;
|
||||
this.dbId = dbId;
|
||||
this.dbPw = dbPw;
|
||||
}
|
||||
|
||||
public String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setHost(String host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(String port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(String sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getDbId() {
|
||||
return dbId;
|
||||
}
|
||||
|
||||
public void setDbId(String dbId) {
|
||||
this.dbId = dbId;
|
||||
}
|
||||
|
||||
public String getDbPw() {
|
||||
return dbPw;
|
||||
}
|
||||
|
||||
public void setDbPw(String dbPw) {
|
||||
this.dbPw = dbPw;
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import com.qtagger.Activity.AccountList;
|
||||
import com.qtagger.Activity.CameraActivity;
|
||||
import com.qtagger.Activity.NavigationActivity;
|
||||
import com.qtagger.Activity.TestSelectActivity;
|
||||
import com.qtagger.Data.OracleConnectionString;
|
||||
import com.qtagger.Database.AccountData;
|
||||
import com.qtagger.Database.DBHelper;
|
||||
import com.qtagger.Database.NuclideData;
|
||||
@@ -58,6 +59,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
CommonHelper.usbDevicePermission(this);
|
||||
CommonHelper.FolderClear();
|
||||
dataManager.dbHelper = new DBHelper(getApplicationContext());
|
||||
dataManager.connectionString = new OracleConnectionString();
|
||||
|
||||
//테스트용도 나중에 삭제
|
||||
findViewById(R.id.imageView).setOnClickListener(v -> {
|
||||
@@ -83,6 +85,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
dataManager.loginAccount = accountList.get(selId-1);
|
||||
Intent intent = new Intent(getApplicationContext(), TestSelectActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
//Intent intent2 = new Intent(getApplicationContext(), NavigationActivity.class);
|
||||
//startActivity(intent2);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class CommonHelper {
|
||||
else
|
||||
{
|
||||
UsbSerialDriver sDriver = usbDefaultProber.probeDevice(usbDevice);
|
||||
ft232rPermission = usbManager.hasPermission(sDriver.getDevice());
|
||||
ft232rPermission = !usbManager.hasPermission(sDriver.getDevice());
|
||||
}
|
||||
|
||||
return ft232rPermission;
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.provider.MediaStore;
|
||||
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.qtagger.Data.OracleConnectionString;
|
||||
import com.qtagger.Data.TestEnum;
|
||||
import com.qtagger.Database.ACCEPT_TEST;
|
||||
import com.qtagger.Database.AccountData;
|
||||
@@ -30,6 +31,7 @@ public class DataManager {
|
||||
public DBHelper dbHelper;
|
||||
public ATRfidReader rfidReader;
|
||||
public ATScanner barcodeScanner;
|
||||
public OracleConnectionString connectionString;
|
||||
|
||||
public static TestEnum testEnum = TestEnum.선택안함;
|
||||
public static Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
|
||||
BIN
app/src/main/res/drawable-v24/database_icon_32.png
Normal file
BIN
app/src/main/res/drawable-v24/database_icon_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 659 B |
BIN
app/src/main/res/drawable-v24/excel_icon_32.png
Normal file
BIN
app/src/main/res/drawable-v24/excel_icon_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-v24/select_all_icon_32.png
Normal file
BIN
app/src/main/res/drawable-v24/select_all_icon_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-v24/select_off_icon_32.png
Normal file
BIN
app/src/main/res/drawable-v24/select_off_icon_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-v24/upload_32.png
Normal file
BIN
app/src/main/res/drawable-v24/upload_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- #f5f5f5" 색으로 채움 -->
|
||||
<solid
|
||||
android:color="@android:color/transparent"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="3dp"
|
||||
android:bottomRightRadius="3dp"
|
||||
android:topLeftRadius="3dp"
|
||||
android:topRightRadius="3dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/gray_item"/>
|
||||
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/sync_low_button_background.xml
Normal file
15
app/src/main/res/drawable/sync_low_button_background.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<!-- -->
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/black" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- -->
|
||||
<item android:top="1dp"> <!-- -->
|
||||
<shape>
|
||||
<solid android:color="#ffffff" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
173
app/src/main/res/layout/activity_db_setting.xml
Normal file
173
app/src/main/res/layout/activity_db_setting.xml
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".Activity.DbSettingActivity">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:id="@+id/imageFilterButton_Back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFF"
|
||||
android:minWidth="48dp"
|
||||
android:minHeight="48dp"
|
||||
android:src="@drawable/back_arrow_5821"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewRadiation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Database"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:background="#000000"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textSize="14sp"
|
||||
android:text="DATABASE SERVER DETAILS"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/database_setting_item_background"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="10dp"
|
||||
android:text="데이터 베이스 IP"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_ip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="10dp"
|
||||
android:gravity="right"
|
||||
android:textSize="16sp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="정보를 입력하세요"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/database_setting_item_background"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="10dp"
|
||||
android:text="데이터 베이스 PORT"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_port"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="10dp"
|
||||
android:gravity="right"
|
||||
android:textSize="16sp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="정보를 입력하세요"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/database_setting_item_background"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="10dp"
|
||||
android:text="데이터 베이스 SID"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_sid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="10dp"
|
||||
android:gravity="right"
|
||||
android:textSize="16sp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="정보를 입력하세요"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal">
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_OK"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/black"
|
||||
android:text="확인"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_Cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/gray_item"
|
||||
android:text="취소"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -78,12 +78,24 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<android.widget.Button
|
||||
android:id="@+id/Item_Setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/database_icon_32"
|
||||
android:background="@drawable/nuclide_item_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:text=" 서버 정보"
|
||||
android:gravity="left|center"
|
||||
android:textSize="20sp"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
<android.widget.Button
|
||||
android:id="@+id/Item_Upload"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/upload_32"
|
||||
android:background="@drawable/button_list_background"
|
||||
android:background="@drawable/nuclide_item_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:text=" 데이터 업로드"
|
||||
android:gravity="left|center"
|
||||
@@ -95,18 +107,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/download_32"
|
||||
android:background="@drawable/button_list_background"
|
||||
android:background="@drawable/nuclide_item_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:text=" 데이터 다운로드"
|
||||
android:gravity="left|center"
|
||||
android:textSize="20sp"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<android.widget.Button
|
||||
android:id="@+id/Item_ExcelExport"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/excel_icon_32"
|
||||
android:background="@drawable/nuclide_item_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:text=" 엑셀"
|
||||
android:gravity="left|center"
|
||||
android:textSize="20sp"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -76,8 +76,42 @@
|
||||
android:id="@+id/list_pkg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:choiceMode="multipleChoice"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/sync_low_button_background"
|
||||
android:orientation="horizontal">
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_allSelect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableLeft="@drawable/select_all_icon_32"
|
||||
android:text="전체 선택"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
>
|
||||
</View>
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_offSelect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableLeft="@drawable/select_off_icon_32"
|
||||
android:text="선택 해제"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -9,4 +9,5 @@
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="colorPrimary">#d84315</color>
|
||||
<color name="colorSendText">#82CAFF</color>
|
||||
<color name="gray_item">#A5A5A5</color>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user