我正在尝试显示可用传感器的列表,但它就像没有!
我以为这是因为模拟器,但我在手机上尝试了它,结果是一样的.
private SensorManager mSensorManager;
TextView mSensorsTot,mSensorAvailables;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Get the texts fields of the layout and setup to invisible
mSensorsTot = (TextView) findViewById(R.id.sensoritot);
mSensorAvailables = (TextView) findViewById(R.id.sensoridisponibili);
// Get the SensorManager
mSensorManager= (SensorManager) getSystemService(SENSOR_SERVICE);
// List of Sensors Available
List<Sensor> msensorList = mSensorManager.getSensorList(SensorManager.SENSOR_ALL);
// Print how may Sensors are there
mSensorsTot.setText(msensorList.size()+" "+this.getString(R.string.sensors)+"!");
// Print each Sensor available using sSensList as the String to be printed
String sSensList = new String("");
Sensor tmp;
int …Run Code Online (Sandbox Code Playgroud) 我,我有一项服务,我希望它一旦开始,它每30秒执行一次.我怎样才能做到这一点?
Tnk Valerio
我已经阅读了市场支持,"如果您之前已经免费发布了一个应用程序,那么您无法将其更改为有价格."
但我想知道,如果相反我将我的应用程序从付费更改为免费,并在一段时间后我想重新将其从免费更改为付费!我可以吗?如果是的话,我是否需要等待一段时间(我在合同中读过这样的内容)?
TNK的
Valerio来自意大利