본문 바로가기
[android] Direct Reply Tutorial https://blog.stylingandroid.com/nougat-direct-reply/ -Direct Reply 는 Notification 으로부터 App Launch 없이 바로 답장을 보내는 기능이다.Message App 에 한정되지 않고 모든 앱이 사용 가능하다. -Direct Reply 는 Android N Nougat 버전에 한해 사용 가능하다. -Direct Reply 의 키는, Notification 을 만들 때 remoteInput 을 추가하는 것이다.// notification 생성private static final String REPLY_KEY = “reply”;private static final String REPLY_LABEL = “Input reply”; // Action.. 2018. 2. 28.
[android] Google Sign In 코드 짜기 #2 [android] Google Sign In 코드 짜기 #2 https://developers.google.com/identity/sign-in/android/sign-in GoogleSignInApi ref doc.https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/package-summary -sign-in activity 의 onCreate 에서 GoogleSignInOptions 과 GoogleApiClient 를 생성한다.private void doSomething() { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSign.. 2018. 2. 23.
[ios] AFNetworking 을 이용하여 File download start, pause, resume, stop 시키기 [ios] AFNetworking 을 이용하여 File download start, pause, resume, stop 시키기 static NSString* const kZipURL = @"http://download.thinkbroadband.com/200MB.zip"; @interface ViewController (){ AFHTTPRequestOperation* _operation;} @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; [self initHTTPRequestOperation]; // 더 적합한 position 으로 옮겨야 하지만, 개념만 보여주기 위해.} - (IBAction)onStartCli.. 2018. 2. 21.
[ios/code snippet] Phone 인지 Pad 인지 검사하기 [ios/code snippet] Phone 인지 Pad 인지 검사하기 https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/c/tdef/UIUserInterfaceIdiom UIUserInterfaceIdiom userInterfcae = [UIDevice currentDevice].userInterfaceIdiom;if ( userInterfcae == UIUserInterfaceIdiomPad ) { NSLog(@“This is Pad”);} else if ( userInterfcae == UIUserInterfaceIdiomPhone ) { NSLog(@“This is Phon.. 2017. 11. 26.
[java] readResolve, writeReplace 뭐 하는 녀석일까? [java] readResolve, writeReplace 뭐 하는 녀석일까? 참조 : http://www.javalobby.org/java/forums/t17491.html singleton 의 경우 serialization 을 하면서 singleton 유지가 안 될 수 있다. Serialization 은 readResolve() 라는 private method 를 통해서 instantiation 을 진행한다. 이 녀석은 serialization 의 결과로 return 되는 object 를 이야기한다. public final class MySingleton {private static final MySingleton INSTANCE = new MySingleton();private MySingleton.. 2016. 11. 3.
[android] PageTransformer 와 함께 하는 ViewPager 의 화려한 animation [android] PageTransformer 와 함께 하는 ViewPager 의 화려한 animation 참조 : https://medium.com/@BashaChris/the-android-viewpager-has-become-a-fairly-popular-component-among-android-apps-its-simple-6bca403b16d4 -ViewPager.PageTransformater interface 를 구현하면 매번 screen transition 이 발생할 때마다 tansformPage() 함수가 불린다. -position 값은 screen 의 center 로 부터 해당 page 가 어디에 위치하느냐를 나타낸다.page 가 screen 전체를 가득 채웠을 때에는 0 값을 가진다... 2016. 10. 4.
[android] ViewAnimator 뭐하는 녀석이야? [android] ViewAnimator 뭐하는 녀석이야? - ViewAnimator 는 FrameLayout 을 상속한 녀석으로 view 간의 switching 이 있을 때 animation 을 하는 녀석. -ViewAnimator 안에 view 들을 넣고, viewAnimator.showPrevious() 나 viewAnimator.showNext() 를 호출하면, child view 들이 순차적으로 animation 하며 나타났다 사라졌다 한다. -index 를 통해서도 view 의 visibility 를 control 할 수 있다.viewAnimator.setDisplayChild( int index ) -animation 은 setInAnimation() 과 setOutAnimation() 을 .. 2016. 9. 5.
[iOS Study] 코어 데이터 [iOS Study] 코어 데이터 출처 : 아론 힐리가스의 iOS 프로그래밍 -데이터를 로컬에 저장하는 방법은 “아카이빙” 또는 “코어 데이터” 를 사용한다. -아카이빙의 가장 큰 결점은 전부 다냐 아무것도 아니냐는 특성에 있다.아카이브 안의 내용에 접근하려면 전체 파일을 언아카이브해야 한다.변경사항을 저장하려면 전체 파일을 다시 쓰기 해야 한다.반면 코어 데이터(Core Data)는 저장된 객체의 일부만 가져올 수 있다.그리고 어떤 객체를 변경한다면 파일의 해당 부분만 갱신할 수 있다.이러한 점진적 가져오기, 업데이트, 삭제, 삽입은 파일시스템과 메모리 사이를 오가는 많은 모델 객체를 가지는 경우 앱의 급격한 성능 향상을 가져올 수 있다. -코어 데이터는 객체-관계형 매핑 ( object-relatio.. 2016. 3. 25.
[iOS Study] 웹 서비스와 UIWebView [iOS Study] 웹 서비스와 UIWebView 출처 : 아론 힐리가스의 iOS 프로그래밍 -NSURL URL 포맷에 웹 프로그램의 위치를 담고 있다. URL 은 여러 웹 서비스를 위해 기본 주소, 통신하고 있는 웹 프로그램, 전달 인자로 구성된다. https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/ -NSURLRequest 웹 서버와 통신할 때 필요한 모든 데이터를 가진다. NSURL 객체와 캐시 정책, 웹 서버의 응답 제한 시간, HTTP 프로토콜을 통해 전달되는 추가 데이터 등을 가진다. NSMutableURLRequest 는 NSURLRequest 의 변경 가능한 .. 2016. 3. 15.
반응형