본문 바로가기
[android] PDF file 읽는 방법 [android] PDF file 읽는 방법 https://commonsware.com/blog/2017/01/04/options-viewing-pdfs.html -ACTION_VIEW action Intent 를 통해 third-party app 으로 권한을 양도 -PdfRenderer 를 써서 직접 구현.https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.html API Level 21 부터 사용할 수 있으나, Bitmap 으로 render 를 시키고, 사용하기가 어렵다.표준을 따른 일부 PDF 들만 rendering 가능하다는 약점이 있다. -pdf.jshttps://mozilla.github.io/pdf.js/ Mozi.. 2018. 3. 16.
[ios tutorial] UIImage RenderingMode ( Template Image ) [ios tutorial] UIImage RenderingMode ( Template Image ) 출처 :https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/index.html#//apple_ref/doc/uid/TP40012857-UIView-SW7https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/#//apple_ref/c/tdef/UIImageRenderingMode -UIImageRenderingMode 는 3가지 형태가 있다. Automatic AlwaysOriginal Templ.. 2018. 1. 28.
[android] Android 6.0(MOS) SDK 에서 바뀐 것들!! [android] Android 6.0(MOS) SDK 에서 바뀐 것들!! https://commonsware.com/blog/2015/08/17/random-musings-android-6p0-sdk.html -ACTION_INSTALL_PACKAGE 를 사용하면서 targetSdkVersion 이 22 이상이면 REQUEST_INSTALL_PACKAGE permission 이 반드시 있어야 한다. -PendingIntent 는 FLAG_IMMUTABLE 이라는 option 이 있다.이것은 PendingIntent 를 invoke 할 때 변형되지 않게 하는 것으로 security 측면에서 좋다. -새로운 Setting screen 들을 Settings 의 action string 을 통해 접근할 수 있.. 2017. 9. 18.
[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.
[android] webview 에서 파일 업로드하기 -아래 input type 이 file 인 html 코드는 안드로이드 webview 에서 제대로 작동을 안 한다. 즉 해당 button 을 눌러도 파일 선택 창이 뜨지 않는다는 것. - 이 경우 webview 에 WebChromeClient 를 set 해주면서 필요한 함수를 구현해주면 된다.private static final int RC_FILE_CHOOSE = 2833;private ValueCallback mUploadMsg = null; ...webView.setWebChromeClient(new WebChromeClient() {// ICS 에서도 동작하기 위해서는 아래메소드도 넣어줘야함.public void openFileChooser(ValueCallback uploadFile, String.. 2015. 12. 7.
android 에서 gif 재생하기 - GifDrawable. ( Open Source LIbrary ) android 에서 gif 재생하기 - GifDrawable. ( Open Source LIbrary ) https://github.com/koral--/android-gif-drawable 안드로이드는 기본 GIF 파일을 자동으로 draw 하지 못한다. 하지만 이 GifDrawable open source 는 이를 지원한다. 이 녀석은 NDK 를 사용해서 frame 을 render 하기 때문에, 기존의 WebView 나 Movie class 를 이용하여 rendering 하는 것보다 훨씬 효율적이다. android gif, android 에서 gif 재생하기 - GifDrawable. ( Open Source LIbrary ), Draw, FRAME, Gif, gif 재생, gitdrawable, Mo.. 2014. 4. 16.
[android] ~Jelly Bean WebView vs. Kitkat WebView. [android] ~Jelly Bean WebView vs. Kitkat WebView. http://stefanodacchille.github.io/blog/2014/02/23/webview-explorations/ Hit test result. WebView 에서 어떤 element 를 touch 했을 경우,WebView.getHitTestResult() 를 호출하면 hitTestResult object 가 return 된다. HitTestResult 에는 element type 과 url 값이 들어있다.예를 들어 tag 를 touch 했을 때는 WebView.HitTestResult.SRC_ANCHOR_TYPE 이 type 으로 return 된다. 기존 WebView 는 이 녀석이 지원하지 않는 e.. 2014. 4. 10.
[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.
[android] webview 의 링크에 따라 다른 action 취하도록 하기 android, webview 의 링크에 따라 다른 action 취하도록 하기 WebView wv = new WebView( this );wv.loadDataWithBaseURL( null, "구글이당", "text/html", "utf-8", null );wv.setWebViewClient( new WebViewClient(){@Overridepublic boolean shouldOverrideUrlLoading(WebView view, String url) {if( url.equals( "http://www.google.com/" ) ){Intent intent = new Intent( Intent.ACTION_VIEW );intent.setData( Uri.parse( "http://www.nave.. 2014. 2. 24.
반응형