이 블로그 검색

2012년 2월 5일 일요일

SVN 서버에 소스 업로드

개발의 편의를 위해 SVN 서버에 서버를 올리고 필요할 때 마다 노트북이나 PC로 다운을 받아서 쓸려고 할 때, 맨 처음 share project 만 하고, commit을 안하는 경우가 있다.
이러면 소스가 올라가 지지 않는다.





Share project를 한 후
반드시 프로젝트를 commit 를 해줘야 한다 ~! (이 과정을 깜박 잊고 "왜 안되지?" 하는 경우가 많다... ㅠㅠ)



이 과정을 안 거치면,
아래와 같이 프로젝트 폴더만 나오고 하위의 소스 파일들과 폴더들이 나오지 않는다..
(왜냐... 아직 Commit 한게 없기 때문이다!)

2012년 2월 2일 목요일

Exception 이 나면 메써드를 자동 종료하고 빠져 나오나?

아래와 같은 메써드에서 에러가 나는 것도 아니고, 자꾸 아래 1번이라고 써있는 곳 까지만 로그가 찍히고 그 밑에 로직은 전혀 타지 않았다..
알고보니 SetMrzBuho라는 메서드가 ClassCastException 이 나서 주석처리하고 다시 실행해 보니 정상적으로 실행이 되더라... (이럴수도 있는 건가? ** 어쨋든 시스템 로그도 틈틈히 봐야 겠다.)


private void OnS32(byte[] ss) {
String sBuho;
sBuho = ArS32_2.xS(ss, 2, 0);
Log.d("OOOOO", "ss in ShowCurrentPrice = " + ss);
// 현재가
_a(R.id.cur_price_v, Util.addComma(ArS32_2.xS(ss, 4, 0).replace(".", "").trim()), 0);

Log.d("OOOOOO", "cur_price_v =11111 = " + Util.addComma(ArS32_2.xS(ss, 4, 0).replace(".", "").trim()));

Log.d("OOOOOO", "XXXXXXXXXXXXXXXXXXXXXXXX11111");  //1번
// 등락부호
SetMrzBuho(R.id.arrow, sBuho);  // 이 녀석이 Exception 이 발생하는 녀석이었다. (classCast Exception) 그런데 딱 여기까지만 진행 되고 밑에 로그가 안찍히는 거다~!! 이런 일도 가능한가?

// 전일비
_a(R.id.updown_v,
Util.addComma(ArS32_2.xS(ss, 3, 0).replace(".", "").trim()),
Util.drColor(sBuho));
Log.d("OOOOOO", "updown_v = 2222 " + Util.addComma(ArS32_2.xS(ss, 3, 0).replace(".", "").trim()));
Log.d("OOOOOO", "XXXXXXXXXXXXXXXXXXXXXXXX22222");
// 등락률
_a(R.id.ratio_v,
Util.addComma(ArS32_2.xS(ss, 5, 0).replace(".", "").trim(), 2) + "%", Util.drColor(sBuho));
Log.d("OOOOOO", "ratio_v = 33333  " + Util.addComma(ArS32_2.xS(ss, 5, 0).replace(".", "").trim(), 2));
Log.d("OOOOOO", "XXXXXXXXXXXXXXXXXXXXXXXX33333");

}

2012년 2월 1일 수요일

안드로이드 SMS, MMS 삭제

*SMS(단문 문자)와 MMS(장문 문자)가 지우는 로직이 다르다 ~!!  --> 엄청 헤멤.

안드로이드 개발 문서가 빈약함을 절실하게 느낀다.. ㅜㅜ
ContentResolve에 쓰이는 URI에 대한 설명이 어디에도 없다.. ;;
어떻게 알고 쓰라고?!

 public void deleteSpecifiedSMSHistory(ArrayList<String>address){

Uri uri = Uri.parse("content://sms");         //우선 Content URI가 다르다.


Uri uri_mms = Uri.parse("content://mms");

          ContentResolver contentResolver = getContentResolver();
  for (int i = 0; i < address.size(); i++) {
String where = "address = " + "'" + address.get(i) + "'";
Cursor cursor = contentResolver.query(uri, null, where, null, null);
Cursor cursor_mms = contentResolver.query(uri_mms, null, where, null, null) ;

while (cursor.moveToNext()) {      // Delete SMS
long thread_id = cursor.getLong(1);   // SMS는 thread_id 값을
Uri thread = Uri.parse("content://sms/conversations/"+ thread_id);
getContentResolver().delete(thread, null, null);
}

while(cursor_mms.moveToNext()){   //Delete MMS
long _id = cursor_mms.getLong(0);   // MMS는 _id 값을 가져와야 정상적으로 삭제가 된다 !! 이것을 누가 알까? 

Uri thread = Uri.parse("content://mms/inbox/" + _id);
getContentResolver().delete(thread, null, null);
}
}
    }