[android-developers] Proper way to communicate service errors to activity

2012-09-21 Thread Cool Frood
Hi, I'm trying to implement a service that is started by an activity. When the service starts off, it spawns a worker thread that makes a socket connection. If the socket connection fails, I want to stop the service. All this is working fine, but I don't have a good handle of how to

[android-developers] Hooks in Activity life cycle

2008-11-23 Thread Cool Frood
Hi, I'm trying to create an app that needs to do this: a) Hold the PARTIAL_WAKE_LOCK in the started mode so that it continues to work even if the screen goes off (it is a sound-based application) b) May or may not turn off the sound when the home key is pressed. Either way is fine with me. c)

[android-developers] Re: How shall I need design my application when the device be rotated?

2008-11-23 Thread Cool Frood
On Nov 8, 1:33 pm, hackbod [EMAIL PROTECTED] wrote: As far as canceling the auto-adjustment I'm not sure what you mean -- if you mean you want to force oneorientation, you can specify in the manifest afixedorientationto use.  If you mean you don't want to relayout the screen at all...  

[android-developers] Re: MediaPlayer looping bug?

2008-11-17 Thread Cool Frood
that some ringtone files would loop continuously while others would only play when triggered by the ring signal from the network. On Nov 16, 6:00 pm, Cool Frood [EMAIL PROTECTED] wrote: On Nov 16, 3:37 pm, Cool Frood [EMAIL PROTECTED] wrote: On Nov 16, 10:49 am, Cool Frood [EMAIL PROTECTED] wrote

[android-developers] MediaPlayer looping bug?

2008-11-16 Thread Cool Frood
I'm trying to write play a sound once using a MediaPlayer object: MediaPlayer p1 = MediaPlayer.create(ctx, R.raw.tick); p1.setLooping(false); p1.start(); R.raw.tick is a short OGG file. This always causes the MediaPlayer to loop. Even if I use an OnCompletionListener, it is never invoked.

[android-developers] Re: MediaPlayer looping bug?

2008-11-16 Thread Cool Frood
On Nov 16, 10:49 am, Cool Frood [EMAIL PROTECTED] wrote: I'm trying to write play a sound once using a MediaPlayer object: MediaPlayer p1 = MediaPlayer.create(ctx, R.raw.tick); p1.setLooping(false); p1.start(); R.raw.tick is a short OGG file.  This always causes the MediaPlayer to loop

[android-developers] Re: Problem accessing r.drawable.somestuff

2008-11-16 Thread Cool Frood
Fräntz, Make sure that you're not importing android.R into your .java file. I had the same problem once. If you import android.R, your own R will not be visible. Akshat On Nov 16, 6:38 pm, Fräntz Miccoli [EMAIL PROTECTED] wrote: I've understood something new on my problem, I can not use my

[android-developers] Re: MediaPlayer looping bug?

2008-11-16 Thread Cool Frood
On Nov 16, 3:37 pm, Cool Frood [EMAIL PROTECTED] wrote: On Nov 16, 10:49 am, Cool Frood [EMAIL PROTECTED] wrote: I'm trying to write play a sound once using a MediaPlayer object: MediaPlayer p1 = MediaPlayer.create(ctx, R.raw.tick); p1.setLooping(false); p1.start(); R.raw.tick