Android 2.1 Sensors with screen off

by Jamie » Mon, 15 Feb 2010 21:41:13 GMT


Sponsored Links
 Hi,

I am writing an application for the Nexus One where I require the
accelerometer and/or the orientation sensor to remain active while the
screen is off. I have taken a partial wake lock, but it is quite clear
that as soon as the screen goes off any sensor updates stop.

I have searched this forum and it appears this was an issue previously
which was fixed in Cupcake. Is this a new bug in 2.1 or is this a
limitation of the handset (or even a deliberate design decision?)

Thanks in advance,

Jamie

--



Other Threads

1. EditText number only?

Hi:

I have an EditText field that is intended for only numbers ( digits,
decimal point, +/- signs). How do I tell the software keyboard to jump
to numeric mode directly?

Wah
--~--~---------~--~----~------------~-------~--~----~

2. retrieving freeMemory(), totalMemory() & MaxMemory from other applications

Is there a way to retrieve the free memory, total memory and maximum
memory of other applications/processes using my application? I use
Runtime.getRuntime().freeMemory() but it can only retrieve your
current application... If there's somehow a method where I can just
input their PIDs or Package Names like "Runtime.getRuntime().freeMemory
().packageName" for example.. Here's my code...

int availProc = Runtime.getRuntime().availableProcessors();
                long total = Runtime.getRuntime().totalMemory();
                long free = Runtime.getRuntime().freeMemory();
                long max = Runtime.getRuntime().maxMemory();

                Toast.makeText(getApplicationContext(),availProc + "\nTM "
                                + Long.toString(total) + "\nFM " + 
Long.toString(free)
                                + "\nMM" + Long.toString(max),
 
Toast.LENGTH_SHORT).show();
                }
--~--~---------~--~----~------------~-------~--~----~

3. BufferedReader problem

4. Media AspectRatio

5. "Complete Action Using" dialog

6. Updating framework - How to include new Java classes for android.jar

7. How to deactivate camera