분류 전체보기536 Android 네트워크 시간 가져오는 방법 Android 네트워크 시간 가져오는 방법 해당 어플리케이션이 자동 시간을 해제할 경우 네트워크 시간을 가져오기 위해서 검색했습니다.네트워크 시간을 가져오기 전에 날짜 및 시간 체크가 자동설정으로 되어있는지 체크를 하고 진행했습니다. -> 날짜 및 시간 자동 설정 체크 참고 코드public static final String TIME_SERVER = "pool.ntp.org"; public static long getCurrentNetworkTime() { NTPUDPClient lNTPUDPClient = new NTPUDPClient(); lNTPUDPClient.setDefaultTimeout(3000); long returnTime = 0; try { lNTPUDPClient.open(); Ine.. 2018. 1. 17. switch 의 버튼 비활성화는 setEnabled(boolean) switch 의 버튼 비활성화는 setEnabled(boolean) Android Switch 버튼의 비활성화는 setEnabled() 메서드로 처리를 한다. 2018. 1. 5. 디자인 패턴 - Strategy Pattern 디자인 패턴 - Strategy Pattern Interface 와 구현체들그리고 Interface 를 Delegate 한 ClassDelegate 한 클래스를 사용하는 Main Class 강의 : https://www.inflearn.com/course/%EC%9E%90%EB%B0%94-%EB%94%94%EC%9E%90%EC%9D%B8-%ED%8C%A8%ED%84%B4/ 2018. 1. 2. 새해 시작을 운동으로 다행이도 새해 첫날을 운동과 함께 시작했다. 시작이 나쁘지 않은것 같다. 2018. 1. 1. Listview 관련 Error - The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread Listview 관련 ErrorThe content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread 상황 : 현재 SM-T813 디바이스 에서 발생. 성능이 더 좋은 디바이스(SM-T815NO)에서는 발생하지 않는 이슈. 해결 : 참고 블로그의 말대로 UI 쓰레드를 돌리면서 진행. 다만, 이런 문제도 디바이스 성능이 뛰어나면 나오지 않는걸 보고, 디바이스가 너무 좋으면 코드가 개판이래도 돌아가니깐, 내가 짠 코드가 문제 없구나를 생각할.. 2017. 12. 27. 카메라 앱 열면서 앱 중지 android.os.FileUriExposedException 카메라 앱 열면서 앱 중지android.os.FileUriExposedException 현상 : 카메라 앱 열면서 앱 중지 원인 : targetSdkVersion 을 올렸기 때문에 발생 (23 -> 26)해결 : 이전대로 targetSkdVersion 을 낮추던지 아래와 같이 파일 접근 방법을 바꾸던지Uri photoURI = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".my.package.name.provider", createImageFile()); E/AndroidRuntime: FATAL EXCEPTION: mainProcess: com.iofit.tablet, PID: 30756an.. 2017. 12. 22. 이전 1 ··· 65 66 67 68 69 70 71 ··· 90 다음