android开发:传感器的实例light,proximity,accelerometer,SensorManager,Sensor(含步数计算原理)

package com.lanxin.testsensor;

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.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

android开发:手势开发实例GestureOverlayView,GestureLibrary

private void init() {
mContext = this;
filename = Environment.getExternalStorageDirectory()+”/lanxin/gesture/gesture_1468729525348″;
Log.d(TAG,filename);

mGesture = GestureLibraries.fromFile(filename);

if (!mGesture.load()) {
Toast.makeText(this, “Could not load ” + filename, Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this,addAcitvity.class);
startActivity(intent);
finish();
}

Log.v(TAG, “>>>>>>>mGesture>>>>>>>>>:”);
Log.v(TAG, ” 方向样式: ” + mGesture.getOrientationStyle());
Log.v(TAG, ” 顺序类型: ” + mGesture.getSequenceType());

15455565758114
 
Copyright © 2008-2021 lanxinbase.com Rights Reserved. | 粤ICP备14086738号-3 |