본문 바로가기
[android] Google Sign In 준비하기 #1 [android] Google Sign In 준비하기 #1 https://developers.google.com/identity/sign-in/android/start-integrating -Google Sign-In 을 사용하기 위해서는 아래와 같은 조건이 필요하다. 단말 Android 2.3 이상 & Google Play Store 개발환경 최신버전의 Android SDK Android 2.3 이상 Google Play Services 설치 ( sdk manager 통해 ) -아래 명령을 통해 keystore 의 SHA1 추출keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore -https://de.. 2018. 2. 22.
[Java] Condition 은 어떻게 쓰는걸까? 예를 통해 함 보자. - Condition 에 대해 예로 잘 등장하는 코드는 아래와 같다. ( Oracle Java Doc 에 나와 있는 코드 ) /** * 이 Buffer 는 array index 재배치를 하지 않고, front 와 rear 값을 두고 control 해서 rear < front 일수도 있는 형태이다. */ public class BoundedBuffer { private final String[] buffer; private final int capacity; private int front; private int rear; private int count; private final Lock lock = new ReentrantLock(); private final Condition notFull = loc.. 2017. 5. 12.
[Java Concurrency] 동기화 클래스 구현 14.1. 상태 종속성 관리 - 병렬 객체의 상태 종속적인 메소드는 선행 조건이 만족하지 않았을 때 오류가 발생하는 문제에서 비켜날 수도 있겠지만, 비켜나는 일보다는 선행 조건을 만족할 때까지 대기하는 경우가 많아진다. - 자바에 내장된 조컨 큐 메커니즘(condition queue mechanism)은 실행 중인 스레드가 특정 객체가 원하는 상태에 진입할 때까지 대기할 수 있도록 도와주며, 원하는 상태에 도달해서 스레드가 계속해서 실행할 수 있게 되면 대기 상태에 들어가 있던 스레드를 깨워주는 역할도 담당한다. - 일단 선행 조건을 만족하지 않았다면 락을 다시 풀어줘야 다른 스레드에서 상태 변수를 변경할 수 있다. 만약 락을 풀어주지 않고 계속 잡고 있다면 다른 스레드에서 상태 변수의 값을 변경할 수 .. 2017. 5. 8.
[Java Concurrency] 명시적인 락 13.1. Lock 과 ReentrantLock - Lock 인터페이스는 암묵적인 락과 달리 조건 없는(unconditional)락, 폴링 락, 타임아웃이 있는 락, 락 확보 대기 상태에 인터럽트를 걸 수 있는 방법 등이 포함돼 있으며, 락을 확보하고 해제하는 모든 작업이 명시적이다. - public interface Lock{ void lock(); void lockInterruptibly() throws InterruptedException; boolean tryLock(); boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException; void unlock(); Condition newCondition(); } - Reentran.. 2017. 5. 5.
[android] view 기본 click 소리 내는 방법. 안드로이드, view 기본 click 소리 내는 방법. VIew attribute 설정 먼저 view 가 sound effect 를 낼 수 있는 조건을 만들어야 한다.code ( programatically ) 로도 만들 수 있고, xml 로도 만들 수 있다. android:soundEffectsEnabled="true" view.setSoundEffectsEnabled (true ); 소리 내기 view.playSoundEffect( SoundEffectConstants.CLICK ); Android, android:soundeffectenabled, attribute, Click, CODE, condition, playsoundeffect, Programatically, setsoundeffecten.. 2013. 10. 30.
반응형