correct way to use getSystemService?

by yesk13 » Mon, 13 Apr 2009 12:13:58 GMT


Sponsored Links
 KeyguardManager kg = ( KeyguardManager ) getSystemService
( "keyguard" )

is the above correct way to use to get a handle to KeyguardManager
service?

i want to use OnKeyguardExitResult listening to it and do something if
user was not able to authenticate.

your help is greatly appreciated.

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



Other Threads

1. rtsp error (Youtube's rtsp stream)

hi all,

I was tried for rtsp stream for a long time,
finally I could success to play the rtsp stream from mobile Youtube
website,
http://m.youtube.com/
my approach is to copy the stream link and paste it in my code,
then, there are sometimes success to work(play) on Android and
sometimes
will not.
I can't figure out why? is something wrong about Youtube server ?
because my code is just the same, and only change is the stream link
url.
I used VideoView widget and my Android platform is sdk 1.5 and under
x86-based,
so I really want to know why and how can I solved for this.

this is the logcat when I can't work for the video stream.
thanks!!!

=======================================================
W/PlayerDriver( 2116): Using generic video MIO
E/PlayerDriver( 2116): Invalid percentage buffer size 8 (expected 4)
E/PlayerDriver( 2116): Invalid percentage buffer size 8 (expected 4)
E/PlayerDriver( 2116): Invalid percentage buffer size 8 (expected 4)
E/PlayerDriver( 2116): Invalid percentage buffer size 8 (expected 4)
E/PlayerDriver( 2116): Invalid percentage buffer size 8 (expected 4)
E/PlayerDriver( 2116): Invalid percentage buffer size 8 (expected 4)
E/PlayerDriver( 2116): Invalid percentage buffer size 8 (expected 4)
I/ServiceManager( 2112): service 'media.audio_flinger' died
W/MediaPlayer( 3344): MediaPlayer server died!
E/MediaPlayer( 3344): error (100, 0)
E/MediaPlayer( 3344): Error (100,0)
I/ServiceManager( 2112): service 'media.camera' died
D/VideoView( 3344): Error: 100,0

2. Upgrading code to 2.1

Hi there,

I have a widget which I developed using the 1.5 SDK, I am now looking
to make the necessary changes to make it work on 2.1. I have read the
docs regarding this and I have set my manifest as  <uses-sdk
android:minSdkVersion="3" /> so that it can be used from 3 upwards.
What is unclear to me is about breaking code, for example as of 1.5 I
override onStart() method in my service, but that method is deprecated
in newer versions and it has become onStartCommand(), so how a phone
running a newer OS is going to behave there?
The same occurs if I compile it with 2.1 then phones on 1.5 will not
know anything about onStartCommand().

Or did I get the whole thing wrong?

Thanks,
Alberto

3. Get name of current ring tone

4. How to navigate from one page to another?

5. capturing the encoded audio data read by the PV

6. how can i make any service running when the phone is switched on just after the booting.

7. Porting android on a AT91SAM9G20 with 64MByte of RAM and 8MByte dataflash memory