본문 바로가기
[android] ThumbnailUtils 요런 녀석 있는 줄 알았삼? android, ThumbnailUtils 요런 녀석 있는 줄 알았삼? API Level 8 ( Froyo ) 부터 사용할 수 있는 녀석으로. 알짜배기 함수들을 제공한다. 베리 굿!! static BitmapcreateVideoThumbnail(String filePath, int kind) static BitmapextractThumbnail(Bitmap source, int width, int height, int options) static BitmapextractThumbnail(Bitmap source, int width, int height) Android, bitmap, createVideoThumbnail, extractThumbnail, froyo, thumbnailutils, Thumb.. 2014. 4. 4.
[android] video recording duration limit setting. android, video recording duration limit setting. From API level 8 ( Froyo ) it works fine. Intent intent = new Intent( MediaStore.ACTION_VIDEO_CAPTURE );intent.putExtra( "android.intent.extra.durationLimit" , 5 ); // max 5 sec recording available. startActivityForResult( intent, 234 ); activity result 의 data 에는 저장된 동영상의 uri 가 전달된다. ACTION_VIDEO_CAPTURE, activity result, Android, android.intent.e.. 2014. 4. 3.
JSON 과 XML 의 Parsing 비교. ( 속도, 특성, 장단점 ) JSON 과 XML 의 Parsing 비교. ( 속도, 특성, 장단점 ) General -Transfer, Parsing, Query 측면에서 봤을 때 XML 과 JSON 은 거의 비슷하다.( 33 개의 다른 문서를 1200 번정도 OS, Browser 등을 바꿔가며 테스트 했다고 함 ) 출처 : http://www.infoq.com/news/2013/08/xml-json-performance -기본 JavaScript parsing 기준으로 JSON 이 XML 보다 조금 더 느리지만, query 속도는 JSON 이 훨씬 빠르다.jQuery 를 이용했을 경우에는 JSON 이 매우 느려지는데, XML 은 훨~씬 느려진다. -JSON, XML 파싱 속도는 큰 차이가 없으니, 그냥 Data 전송에 치우쳐 생각.. 2014. 4. 2.
[android] make screen awake, no sleep android, make screen awake, no sleep getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); addFlags, Android, FLAG_KEEP_SCREEN_ON, GetWindow, LayoutParams, make screen awake, no sleep, WindowManager 2014. 4. 1.
Eclipse 에서 Android Studio 로 넘어가기. Eclipse 에서 Android Studio 로 넘어가기. Work spaces 와 Sub-Projects 여 안녕~ Eclipse 에서는 Workspace 와 library projects 개념이 친숙했을 것이다.Android Studio 에서는 projects 들은 Modules, library project 들은 Library Modules 이라는 개념으로 통한다. Module 안뇽~ 반가워~ : ) Module 은 독립적으로 실행 가능하고, 테스트 되고, 디버그 되는 녀석을 이야기한다.각 모듈은 각각의 gradle build file이 필요하다.gradle build file 은 android version range, dependency, meta data 등을 포함한다. 개선된 Interfa.. 2014. 3. 27.
[Android] save POJO to SharedPreferences [Android] save POJO to SharedPreferences POJO 를 SharedPreference 에 저장하려면 GSON 을 쓰는 방법도 괜찮다.POJO params 에 대한 encoding, decoding 등을 지원하므로.. Android, decoding, Encoding, field, GSON, member field, Param, POJO, SharedPreference, [Android] save POJO to SharedPreferences 2014. 3. 25.
[android] SlidingPaneLayout Tutorial Android, SlidingPanelLayout Tutorial NavigationDrawer( DrawerLayout ) 가 layout 위로 overlay 되서 등장하는 메뉴라면,SlidingPaneLayout 은 layout 을 밀면서 등장하는 메뉴라고 볼 수 있다. SlidingPaneLayout 은 left side ( 먼저 정의된 녀석 ) 이 sliding 으로 정의되고,right side 는 main content 로 정의된다. NavigationDrawer 와 마찬가지로 자동으로 edge touch 를 통한 sliding 이 지원된다. - 각 fragment 는 그냥 일반적인 fragment 를 다루듯이 사용하면 된다. private class PaneListener implements .. 2014. 3. 19.
[Android] 제대로 된 REST API 를 구축해보자. [Android] 제대로 된 REST API 를 구축해보자. reference : http://mytechaddiction.blogspot.kr/2014/02/rest-interaction-in-android.html?utm_source=Android+Weekly&utm_campaign=4254f212fb-Android_Weekly_91&utm_medium=email&utm_term=0_4eb677ad19-4254f212fb-337262377 Anti-Patterns 1. UI Thread 에서 API Call. 2. Activity 나 Fragment 등에서 Thread 를 만들어 요청 3. 결과를 Memory 에만 저장하여 사용. Decouple the UI from the http call. Act.. 2014. 3. 18.
[android] JavaScript Bridge android, JavaScript Bridge JavaScript Bridge 하이브리드 앱을 만들 때 사용되는 방식으로, HTML 에서 어떤 function call 을 하면 android webview 에서 catch 가능하다. WebView.setJavaScriptEnabled( true );WebView.addJavascriptInterface( new MyBridge(), "AppInterface" ); private class MyBridge{public void functionName( String arg ){// do sth..}} function callAndroidFunction(){window.AppInterface.functionName();} 반대로 App 에서 JavaScrip.. 2014. 3. 17.
반응형