How to lock key, but keep the display active?

by San » Wed, 27 Jan 2010 03:02:20 GMT

Sponsored Links
 Did you implement this?


How to lock key, but keep the display active?

by Dianne Hackborn » Wed, 27 Jan 2010 09:56:51 GMT

 Applications can not prevent the end or home keys from working.  Sorry.


Sponsored Links

Other Threads

1. Permission Categories

Where can I find a listing indicating what level (normal, dangerous,
signature, system) all the available permissions are? I have looked at
the JavaDocs. There is no mention of the level there.



2. org.apache.http.auth Problem

0 down vote favorite

Hi, I used org.apache.http.auth and develop demo code samples like

        DefaultHttpClient httpclient = new DefaultHttpClient();

            new AuthScope("", 80),
            new UsernamePasswordCredentials("*******", "*******"));

    BasicHttpContext localcontext = new BasicHttpContext();

    BasicScheme basicAuth = new BasicScheme();
    localcontext.setAttribute("preemptive-auth", basicAuth);

    // Add as the first request interceptor
    httpclient.addRequestInterceptor(new PreemptiveAuth(), 0);

    HttpHost targetHost = new HttpHost("", 80,

    HttpGet httpget = new HttpGet("/YemeksepetiCatalogWebService/

    String responseStr = "";

    HttpResponse response = httpclient.execute(targetHost, httpget,
    HttpEntity entity = response.getEntity();
    InputStream is2 = response.getEntity().getContent();
    BufferedInputStream bis2 = new BufferedInputStream(is2);

    ByteArrayBuffer baf2 = new ByteArrayBuffer(1000);

    int current = 0;

    while ((current = != -1)
        baf2.append((byte) current);
    responseStr = new String(baf2.toByteArray());

    if (entity != null) {


and add a class :

 static class PreemptiveAuth implements HttpRequestInterceptor {

    public void process(
            final HttpRequest request,
            final HttpContext context) throws HttpException,
IOException {

        AuthState authState = (AuthState) context.getAttribute(

        // If no auth scheme avaialble yet, try to initialize it
        if (authState.getAuthScheme() == null) {
            AuthScheme authScheme = (AuthScheme) context.getAttribute(
            CredentialsProvider credsProvider = (CredentialsProvider)
            HttpHost targetHost = (HttpHost) context.getAttribute(
            if (authScheme != null) {
                Log.v("TANIMLAMA OZGE","target host" +
targetHost.getHostName() +" "+ targetHost.getPort());
                Credentials creds = credsProvider.getCredentials(
                        new AuthScope(
                if (creds == null) {
                    throw new HttpException("No credentials for
preemptive authentication");




But it gives that messages; I couldn't solve the problem. Have you any

    Authentication error: basic authorization challenge expected, but
not found Default buffer size used in BufferedInputStream constructor.
It would be better to be explicit if an 8k buffer is required.

    You are not authorized to view this page
    You are not authorized to view this page
    You do not have permission to view this directory or page using
the credentials that you supplied because your Web browser is sending
a WWW-Authenticate header field that the Web server is not configured
to accept.

    Please try the following:

        * Contact the Web site administrator if you believe you should
be able to view this directory or page.
        * Click the Refresh button to try again with different

    HTTP Error 401.2 - Unauthorized: Access is denied due to server
    Internet Information Services (IIS)

    Technical Information (for support personnel)

        * Go to Microsoft Product Support Services and perform a title
search for the words HTTP and 401.
        * Open IIS Help, which is accessible in IIS Manager (inetmgr),
and search for topics titled About Security, Authentication, and About
Custom Error Messages.



3. alternative markets offers

4. setWallpaper(Bitmap bitmap) just sets default background?

5. Problem running android camera DEMO

6. android.os.DeadObjectException

7. ListView and Memory Leaks