5

私はAndroidアプリケーションを開発しています。画面がオフの場合、特定のデバイス (Samsung Galaxy S バージョン 2.2.1、Samsung Galaxy Ace バージョン 2.3.6 Gingerbread、Motorola Diffy 2.2) で GPS が機能しないことがわかりました。画面がオフの場合でも、他のデバイス (HTC Wildfire 2.3.3) では問題なく動作します。どうしてこれなの?

4

2 に答える 2

2

I'm not sure if that happens, but I faced a similar problem with accelerometer. It won't give any sensor readings when the screen is locked. So what I did was, whenever I want the sensor readings, I just took the wake lock every 5 minutes, so the screen gets ON and then I get the sensor readings. Should be useful to you. The user need not manually do anything.

于 2012-05-17T05:24:42.813 に答える
1

これ WakeLockにより、画面がオフのときにセンサーを使用できます (他のウェイクロックとは異なります)。それがすることは、常にCPUを稼働させ続けることだけです。

于 2012-08-28T13:12:15.517 に答える