KeyguardManager question

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


Sponsored Links
 here is the code for my app

package com.test.bgTest;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.app.KeyguardManager;

public class BackgroundTest extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        final MediaPlayer mp = MediaPlayer.create(this, R.raw.alert);

        KeyguardManager kg = ( KeyguardManager ) getSystemService
( "keyguard" );

    }
}

i want to be able to alert phone owner when pattern login failed.

but how do i use a listener to actually catch the fail attempt to
unlock keyguard.

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



Other Threads

1. Intent action for network events in android sdk



You can try registering the BroadcastReceiver as part of some other
component (Activity, Service) via registerReceiver(). Not all broadcast
Intents work with manifest-registered receivers.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 1.0 In Print!

-- 

2. ImageView.setDrawable does not work

Hi all,
 When I try to set image using

    iv.setImageDrawable(
getResources().getDrawable(R.drawable.up));
    iv.setAdjustViewBounds(true);
    iv.setLayoutParams(new
Gallery.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));

   the image view still shows the image which I have defined in the
xml file.

   <ImageView
       android:id="@+id/dem_icon"
       android:layout_width="wrap_content"
       android:layout_height="fill_parent"
       android:layout_marginRight="6dip"
       android:src="@drawable/down" />

 res/drawable has the following two icons up.png, down.png.

 R.java has the following content

   public static final class drawable {
       public static final int down=0x7f020000;
       public static final int icon=0x7f020001;
       public static final int up=0x7f020002;
   }

 the method is called, because in the next line I am change text of a
TextView which is working fine. But the image always shows 'down.png'

Thanks
DM

-- 

3. How to lookup in contacts table for the contact of the incoming sms

4. Video doesn't appear in SurfaceView using MediaPlayer

5. How to write second number, email, group information of contacts to SIM(ICC)?

6. How do I use a context menu in a WebView without links

7. multiple parameters with rawQuery in sqite