本文整理汇总了Java中android.hardware.SensorListener类的典型用法代码示例。如果您正苦于以下问题:Java SensorListener类的具体用法?Java SensorListener怎么用?Java SensorListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SensorListener类属于android.hardware包,在下文中一共展示了SensorListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ExponentiallyWeightedSmoother
import android.hardware.SensorListener; //导入依赖的package包/类
public ExponentiallyWeightedSmoother(SensorListener listener, float alpha, int exponent) {
super(listener);
Log.d(TAG, "ExponentionallyWeightedSmoother with alpha = " + alpha + " and exp = " + exponent);
this.alpha = alpha;
this.exponent = exponent;
}
示例2: SensorSmoother
import android.hardware.SensorListener; //导入依赖的package包/类
public SensorSmoother(SensorListener listener) {
this.listener = listener;
}
示例3: registerListener
import android.hardware.SensorListener; //导入依赖的package包/类
@Deprecated
public boolean registerListener(SensorListener listener, int sensors, int rate)
//-----------------------------------------------------------------------------
{
throw new UnsupportedOperationException("Deprecated registerListener not supported");
}
示例4: unregisterListener
import android.hardware.SensorListener; //导入依赖的package包/类
@Deprecated
public void unregisterListener(SensorListener listener, int sensors)
//-----------------------------------------------------------------
{
throw new UnsupportedOperationException("Deprecated unregisterListener not supported");
}