기본 콘텐츠로 건너뛰기

7월, 2014의 게시물 표시

Android, OpenGL es, simple source

[Android] 3D API, OpenGL ES - 1 : 초기화  http://www.gisdeveloper.co.kr/entry/Android-3D-API-OpenGL-ES-%EC%B4%88%EA%B8%B0%ED%99%94 [Android] 3D API, OpenGL ES - 2 : 폴리곤 렌더링  http://www.gisdeveloper.co.kr/entry/Android-3D-API-OpenGL-ES-2-%ED%8F%B4%EB%A6%AC%EA%B3%A4-%EB%A0%8C%EB%8D%94%EB%A7%81 src https://github.com/devjyon/OpenGLTest1

JavaScript, detect browser is chrome

<script> function click1(){  alert('click1');      if (navigator.userAgent.match(/Android/)) {   alert ('Android');          if (navigator.userAgent.match(/Chrome/)) {    alert('chrome');           } else {    alert('browser is not chrome');          }       }else{ alert('OS is not Android');       } } </script> <button onclick="click1()">Click me</button>

Android, FLAG_ACTIVITY, intent clear stack

액티비티A가 루트, 액티비티B, C로 이동할수 있을 때, B가 현재 액티비티인 상태에서 백그라운드일 때 URL Scheme로 C로 이동(stack : A / B -> A /C) 시키고 싶었으나, x launchMode를 singleInstance로 하면 B가 액티브인채로 앱이 Resume. x launchMode : singleTask일때는 기대한 움직임이었으나, Back버튼으로 C -> B -> A x launchMode : singleTask + FLAG_ACTIVITY_CLEAR_TOP을 하면 Back버튼시, C -> A -> B -> A * launchMode : singleTask + FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK 로 해결. http://tips.androidhive.info/2013/10/how-to-clear-all-activity-stack-in-android/

Android, URL Scheme

Browser : Link click *data from URL Scheme -> Intent.getData -> uri -> uri.getQueryParameter("attribute name") -> String appname://host1?a=11 uri.getScheme() : appname uri.getHost() : host1 uri.getQueryParameter("a") : 11 http://stackoverflow.com/questions/19045980/receiving-data-for-custom-url-scheme-in-android -------------------------------- appname://aaaa/bbbb uri.getLastPathSegment() : bbbb

Android, Alert의 Button을 눌러 Event Handling

                final Handler handler = new Handler(); AlertDialog.Builder alert =  new AlertDialog.Builder(context); alert.setPositiveButton(“Button”),                 new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); //doAfter is Runnable handler.post(doAfter); return; } });