본문 바로가기

Welcome My World

박진영 - 못 잊은 거죠 더보기
리미와감자 - 오빠 나 추워 더보기
Android 내장 Calendar에서 일정 읽어 오기 Google Calendar와 동기화 하는 방법을 찾다가 Java에서는 쉽게 구현 가능하지만, Android와 Google Calendar API가 궁합이 맞지 않다는 것을 알고 우회하기로 하였다. 어차피 내장 Calendar는 Google Calendar와 자동으로 동기화가 되니, 내장 Calendar에서 값을 읽어 오기로 하였다. // Main.java package com.calendar; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import an.. 더보기
대구대학교 App 공모전 시연용 동영상 더보기
시연 동영상 apk 를 배포한다거나, 정식 서비스 계획은 없습니다. 영화 [악마를 보았다]를 보고 난 뒤, 꼭 필요한 프로그램이 아닐까 해서 개발하였습니다. 하지만, 악용될 경우 사생활 침해의 우려가 매우 높기 때문에 개발 했다는 것에 만족하겠습니다. 더보기
Android EditText의 InputType 설정값 main.xml 속성에서 android:inputType= 으로 설정 가능. 양수 : number / 숫자 : numberSigned / 소수점 : numberDecimal "|" 연산자를 통해 두가지 속성을 같이 적용할 수 있음. (number|numberDecimal) 속성값 android:inputType Since: API Level The type of data being placed in a text field, used to help an input method decide how to let the user enter text. The constants here correspond to those defined byInputType. Generally you can select a sing.. 더보기
Android Service에서 Activity 실행하기 Context context = getApplicationContext(); Intent intent = new Intent(context, Action.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); 더보기
Android에서 URI로 실제 파일 경로 가져오기 /** * URI로 부터 실제 파일 경로를 가져온다. * @param uriPath URI : URI 경로 * @return String : 실제 파일 경로 */ public String getRealImagePath (Uri uriPath) { String []proj = {MediaStore.Images.Media.DATA}; Cursor cursor = managedQuery (uriPath, proj, null, null, null); int index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); String path = cursor.getString(index); path = path.sub.. 더보기
Activity Class나 View Class를 상속 받지 않는 Class의 startActivity() 함수 호출 애니메이션이 들어가는 Menu 화면을 그린다고 Surface Class 를 상속받아서 생성한 클래스 안에서 startActivity 함수를 부르니 에러가 나왔다. " the method startActivity(Intent) is undefined for the type " 이럴때는 getContext().startActivity(intent); 로 써보자. 그러면 startActivity 함수를 사용할 수 있다. 더보기
Activity 생명 주기 더보기