protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main_qr);
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener()
{
public void onClick(View view)
{
// QRÄÚµå ±¸µ¿ÇÕ´Ï´Ù.
IntentIntegrator.initiateScan(Vib_Set_Bits.this);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
// QRÄÚµå °á°ú°ª ºÒ·¯¿À±â
IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
new AlertDialog.Builder(this)
.setTitle(R.string.app_name)
.setMessage(result.getContents() + " [" + result.getFormatName() + "]")
.setPositiveButton("È®ÀÎ", new DialogInterface.OnClickListener()
{
//¿©±â°¡ È®ÀÎ ¹öÆ° ´·¶À»¶§ ¹ÝÀÀ ÀÏÀ¸Å°´Â°÷
public void onClick(DialogInterface dialog, int which)
{
dialog.dismiss();
}
})
.show();
}
public void fine() {
db = openOrCreateDatabase("CSEPM3", MODE_PRIVATE, null);
db.execSQL("drop table if exists lockqr");
db.execSQL("create table lockqr (QR text, code integer primary key autoincrement)");
ContentValues cv = new ContentValues();
db.insert("lockqr", null, cv);
finish();
}
QRÄÚµå ¼Ò½ºÁß ÀϺÎÀä,
QRÄڵ带 Âï¾î¼ ³ª¿Â ¸µÅ©ÁÖ¼Ò(result.getContents())¸¦ µðºñ¿¡ insertÇÏ·Á°íÇϴµ¥...
µµÀúÈ÷ °¨ÀÌ ¾ÈÀâÈ÷³×¿ä..¤Ì¤Ì
µµ¿ÍÁÖ¼¼¿ë..¤Ð¤Ð ¸îÀÏ° Àáµµ ¸øÀÚ°í ÀÌ·¯°íÀÖ½À´Ï´Ù ¤Ì¤Ì¤Ì
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)