목록안드로이드/Device & Sensor (15)
설.현.아빠
http://202psj.tistory.com/entry/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C-%EC%97%AC%EB%9F%AC%ED%95%B4%EC%83%81%EB%8F%84-%EC%A7%80%EC%9B%90-DIP-%EA%B4%80%EB%A0%A8
@Override public void onSensorChanged(SensorEvent event) { if(mCtx.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { // 0점 조정 if(portBaseX > event.values[0]){ event.values[0]=360-(portBaseX-event.values[0]); } else if(portBaseX 20 && event.values[0]
지도를 비롯 위치정보를 이용한 서비스 개발시 유용한 팁 한가지 알려드립니다. 그것은 GPS 연결여부를 체크하여 미연결시 연결설정 화면으로 이동시켜 주는 기능입니다. 소스는 참 간단하죠^^ http://www.androes.com/79
AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE); // ring volume down audio.setStreamVolume(AudioManager.STREAM_RING, (int)(audio.getStreamMaxVolume(AudioManager.STREAM_RING)*0.25), AudioManager.FLAG_PLAY_SOUND); // media volume up audio.setStreamVolume(AudioManager.STREAM_MUSIC, (int)(audio.getStreamMaxVolume(AudioManager.STREAM_MUSIC)*0.75), AudioManager.FLAG_PLAY_SO..
1) import android.provider.Settings.Secure; String android_id = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID); 2) TelephonyManager manager = (TelephonyManager)ctx.getSystemService(Context.TELEPHONY_SERVICE); String deviceId = manager.getDeviceId(); [출처] [개발 Tip] 유일한 Android device ID (안드로이드 개발자모임 [구글폰,HTC,삼성]) |작성자 에디터 흠...이걸 어따 쓰나...내 폰의 ID니까 어플 동작시 나한테만 보이도록 설정할게 있다면....
http://gnuteam.tistory.com/15
// ShakeActivity.java package lee.android.Shake; 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.os.PowerManager; import android.widget.TextView; public class ShakeActivity extends Activity i..
//MainActivity.java package lee.android.Main; import java.io.ByteArrayInputStream; import android.app.Activity; import android.hardware.Camera; import android.os.Bundle; import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.FrameLayout; public class MainActivity extends Activity { public CamView _camView=null; @Override public void onCreate(Bun..