Service + AudioTrack: is WAKE_LOCK needed?

by Paul Marks » Tue, 02 Feb 2010 10:05:48 GMT


Sponsored Links
 


After speaking with one of the developers, I learned:

- On current platforms, the audio driver acquires its own wake lock,
which explains why my phone was not going to sleep.
 http://android.git.kernel.org/?p=platform/hardware/msm7k.git ;a=blob;f=libaudio-qsd8k/AudioHardware.cpp;hb=HEAD

- There's no explicit guarantee that this will always be true for all
platforms, so it's still a good idea to hold a PARTIAL_WAKE_LOCK if
you need to stay awake while using an AudioTrack.

--



Other Threads

1. Spinner won't work with ArrayAdapter in one project but will in another

Hi,

I've been developing a quick little application for the last few days
and I've encountered some problems trying to get my spinner to display
a list of numbers that I have stored in an array resource.

Basically I'm copying the Hello, Spinner example on
http://developer.android.com/guide/tutorials/views/hello-spinner.html

If I copy that exactly then I get a spinner with a list of planets and
it works fine. If I alter the values to reference my own data then I
just get the prompt with a blank line underneath.

Does it matter what data type is stored in the array? I only have
digits in mine, but I couldn't get it to work when I wrote the numbers
out (one, two, etc.).

Does it matter that my layout uses TableLayout instead of
LinearLayout?

Any ideas/suggestions?

I'm using the latest SDK, and an up-to-date version of Eclipse, in
case it makes any difference.

Thanks a lot,
Stuart.

--~--~---------~--~----~------------~-------~--~----~

2. installing .apk file insanity

Here's another one that SHOULD be a no-brainer, but isn't.  Eight
hours of searching on the forums, Google, etc... brings me in circles
back around to very incomplete (and often misleading) information:

Dead end/Question #1:  Downloading via link is not working.

Downloading 3rd party apps is enabled.  When I try to download
the .apk file from the web browser, the Android tells me the file
downloaded, and asks me to install the app.  I click yes, and the
phone doesn't ask me for permission.  The application simply doesn't
show up on the Appliations list.


Dead end/Question #2: Need clear instructions on getting an .apk
installed on the device.

I want to programmatically install an application on the Android by
downloading  the .apk file to the phone.  Forcing the user to accept
the application through startActivity is fine.  I don't need "secret
installs" (nor do I think they're a good idea).

So, using this is fine:

    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("file:///
proper/path/etc/MyApkFile.apk");

Is that even the right way to use Intents to get the .apk file
launched/installed?

When I use it nothing happens.


Dead End/Question #3:

Also, using PackageManager would be good as well, but I can't find ANY
good documentation on how it's used, and NO documentation other than
API reference on IPackageInstallObserver).  What I do find is terribly
incomplete, and includes two year old posts that PackageManager
installs might not be supported.   So, it  took me half a day to
figure out this :

packageManager.installPackage(packagePath);

When I use it nothing happens.  Can't use an observer because the docs
on THAT are lacking as well.




Thanks for any help you can give.

Richard

<venting>

On a related note: I'm very grateful for the Android platform, and
overall it rocks!.  But, having to find basic technical information
through wayward blogs and incomplete documentation has gotten
really .... really .... old.


</venting>




--~--~---------~--~----~------------~-------~--~----~

3. About screen rotation

4. opening a file within a service

5. Live streaming of H.264 encoded file

6. Touchscreen not completely working

7. getting around Phoneapp activity 1.1?