import android.content.Context; import android.view.MotionEvent; public class test extends Activity { @Override public boolean onTouchEvent(MotionEvent event) { int action = event.getAction(); int xPos = -1; int yPos = -1; switch (action) { case (MotionEvent.ACTION_DOWN): // Touch screen pressed break; case (MotionEvent.ACTION_UP): // Touch screen touch ended break; case (MotionEvent.ACTION_MOVE..
import android.app.Activity; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.widget.TextView; public class test extends Activity implements SensorEventListener { private SensorManager sensorManager; private Sensor sensor..
import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; import java.io.DataInputStream; import java.io.IOException; import javax.bluetooth.DiscoveryAgent; import javax.bluetooth.LocalDevice; import javax.bluetooth.UUID; import javax.microedition.io.Connector; import javax.microedition.io.StreamConnection; import javax.microedition.io.StreamConnectionNotifier; public ..
package com.hk.bluecontrol; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.UUID; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; i..
1) 아래에서 android-ndk crystax ndk r4 을 받아 설치한다. Android의 기본 NDK로는 build가 되지 않는다. http://www.crystax.net/android/ndk-r4.php 2) SVN 서버 http://android-opencv.googlecode.com/svn/trunk/ 에서 openCV와 samples를 체크아웃한다. 3) 윈도우 패스 설정 ndk 경로, cygwin\bin 경로 4) cygwin 패스 설정 (.bashrc 실행) export PATH=$PATH:/ndk경로 export ANDROID_NDK_ROOT=/ndk경로 5) openCV 빌드 cygwin에서 openCV 폴더에서 sh build.sh 입력