본문 바로가기

2011/07

(19)
스마트폰 메모리의 구조 (RAM, 주메모리, 설치메모리, 외부메모리) 스마트폰 메모리의 구조 (RAM, 주메모리, 설치메모리, 외부메모리) 과거의 피쳐폰과는 달리 스마트폰은 자신의 원하는 프로그램을 자유롭게 설치할 수 있는 장점이 있다. 하지만 자유롭게 설치한다는 말이 무한한 설치를 의미하지는 않는다. 일반 데스크톱 컴퓨터에 프로그램을 설치하려면 하드디스크에 해당 프로그램의 용량 이상의 빈 저장 공간이 확보되어야 하는 것처럼 스마트폰 역시 자신이 원하는 프로그램을 설치하기 위해서는 이를 위한 공간이 필요하다. 보통 안드로이드 계열의 스마트폰에서 메모리의 구조와 용량을 살펴보는 프로그램을 실행시키면 저장 공간이 램(RAM), 내장메모리(주메모리+ 프로그램 설치메모리), 외장메모리로 구분되는 것을 확인할 수 있다. 하지만 의외로 이런 메모리 구조와 각 공간들의 차이점에 대한 ..
페이스북과 트위터의 차이점, 그리고 활용방법 페이스북과 트위터를 가입한지는 한~~참 지났지만, 저는 아직 이 두 가지툴을 거의 사용하지 않고 있습니다. 시간도 없고, 자꾸 바뻐지면 점점 삶의 여유가 없어지게 될 것이라는 핑계가 가장 큰 이유였죠.-_-; 그러다 최근에 이 두 가지 서비스에 새로운 관심을 가지게 되었고 관련된 생각을 조금씩 정리해보려합니다. :) 페이스북과 트위터의 차이점 - 두 서비스 모두 소셜네트워크 서비스라는 점은 같지만 각자 차별화된 특징이 있다. 1) 페이스북(Facebook) : 쌍방향 관계기반, 느리지만 지속적인 소통 - 페이스북은 쌍방향적인 관계를 기반으로 한 전형적인 소셜네트워크 충실한 서비스이다. 마치 국내의 싸이월드와 같이 친구들끼리 관계를 맺고 이런 관계를 통해 새로운 인맥을 확장해 나가면서 일상적인 안부를 묻거..
안드로이드 화면 캡쳐하기 (코드에서) 안드로이드 개발자라면 기본적으로 디바이스의 화면을 DDMS에서 버튼 클릭으로 캡쳐가 가능하다는 사실을 알고 있을 것이다. 그건 그렇고… 소스 코드에서 캡쳐하는 방법은 없을까….. 여기 있다.. public void screenshot(View view)throws Exception { view.setDrawingCacheEnabled(true); Bitmap screenshot = view.getDrawingCache(); String filename = "screenshot.png"; try { File f = new File(Environment.getExternalStorageDirectory(), filename); f.createNewFile(); OutputStream outStream = n..
안드로이드 소스에서 shell 명령어 실행하기 안드로이드는 리눅스 기반이어서 adb shell을 실행하면 디바이스에서 실행되는 shell 모드로 들어가게 된다. 간단한 ls 명령어를 실행한 모습.. 그런데 소스 레벨에서 이런 명령어를 실행하고 싶을때가 있다. 특정 프로세스를 실행한다던가, 파일 입출력을 실행한다던가, 시스템 자원을 모니터링 한다던가… 아래는 top 명령어를 통해, 시스템 자원을 로그로 내보내는 간단한 코드 이다. Runtime runtime = Runtime.getRuntime(); Process process; String res = "-0-"; try { String cmd = "top -n 1"; process = runtime.exec(cmd); BufferedReader br = new BufferedReader(new In..
Android, low level shell click on screen Android, low level shell click on screen To send touch event you need to do: 1 Set coordinates: adb shell sendevent /dev/input/event2 3 0 x adb shell sendevent /dev/input/event2 3 1 y 2 Send touch event (must have 0 0 0 pair):adb shell sendevent /dev/input/event2 1 330 1 adb shell sendevent /dev/input/event2 0 0 0 3 Send release finger event (must have 0 0 0 pair):adb shell sendevent /dev/input/..
[Android] How to send key event by adb command [android-developers] Re: correct usage of "adb shell input" Madhusudhan K Tue, 02 Dec 2008 10:11:45 -0800 Hi You can use key codes directly like adb shell input keyevent 7 # for key '0' adb shell input keyevent 8 # for key '1' adb shell input keyevent 29 # for key 'A' adb shell input keyevent 54 # for key 'B' we can also send string as a text, like adb shell input text "ANDROID" The below text i..
안드로이드 키 이벤트 (adb shell로 보내는 법) Send key/mouse event using adb shell command. March 28, 2011 Two ways to send key event: 1 adb shell input keyevent KEY_CODE_XXX keycode can be found on developer.android.com eg. adb shell input keyevent 4 #send back key to target 2 adb shell sendevent [device] [type] adb shell sendevent /dev/input/event2 1 102 1 #home key down adb shell sendevent /dev/input/event2 1 102 0 #home key up must use ..
Android UI/Application Exerciser Monkey UI/Application Exerciser Monkey The Monkey is a program that runs on your emulator or device and generates pseudo-random streams of user events such as clicks, touches, or gestures, as well as a number of system-level events. You can use the Monkey to stress-test applications that you are developing, in a random yet repeatable manner. Overview The Monkey is a command-line tool that that you can ..