Accelerometer seems to only work for a few seconds?
问题 With this in the Android Manifest: <receiver android:name=".OnBootReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> </intent-filter> </receiver> And the following as OnBootReceiver.class: package io.cordova.hellocordova; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.hardware.Sensor; import android.hardware