Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5840187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:42:17+00:00 2026-05-22T11:42:17+00:00

I have a live wallpaper that uses vibrate permission. When the slide screen that

  • 0

I have a live wallpaper that uses vibrate permission. When the slide screen that shows all applications is pulled out… (the grey rectangular button which on clicking shows calendar/calculator/Gmail, etc.), the icons on the slide screen like Gmail/calendar/calculator etc. when clicked also vibrate. I wonder why that should happen, since the wallpaper should lose focus, its visibility should have changed and hence the wallpaper should not be active. However, this does not happen when the application starts running. It happens only on the slide screen. I have implemented OnvisibilityChanged().

 public void onVisibilityChanged(boolean visible) {
     this.visible = visible;
     if (visible) {
        iteration();
        drawFrame();
     } else {
        // stop the animation
        mHandler.removeCallbacks(mIteration);
     }
  }

this.visible is set to false in onSurfaceDestroyed.

I have also done

View view = new View(getApplicationContext());
view.setFocusableInTouchMode(true);
view.setEnabled(true);
view.requestFocusFromTouch();
if(view.hasWindowFocus())
{
 Log.v(TAG,"WindowFocus="+view.hasWindowFocus());
 vibrator.vibrate(100);
}

but view.hasWindowFocus is always false. Why is this window focus always false and how can I make the wallpaper lose focus?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:42:17+00:00Added an answer on May 22, 2026 at 11:42 am

    A couple of things…
    1) You cannot work with views that way within live wallpaper. You must limit yourself to the canvas you get from holder.lockCanvas().
    2) It sounds like you’re getting a weird interaction with the launcher. These things happen. If you are just processing simple screen taps, you can probably work around your issue by using onCommand() to check for android.wallpaper.tap instead of using onTouchEvent(). That’s better practice, because you will only get sent taps on free spaces in the wallpaper; otherwise you will also get screen presses that are processed by the launcher. There’s a little info about onCommand here: http://developer.android.com/resources/articles/live-wallpapers.html
    For instance something like this…

    @Override
    public Bundle onCommand(String action, int x, int y, int z, Bundle extras, boolean resultRequested) {
        if (action.equals(WallpaperManager.COMMAND_TAP)) {
              mTouchX = x;
              mTouchY = y;
        }
        return super.onCommand(action, x, y, z, extras, resultRequested);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Live Wallpaper that uses various screen touches to trigger certain events.
I have an OpenGL Live wallpaper that works fine on all phones except those
So I am modifying the Cube live wallpaper example. I have a class that
I have a live wallpaper that crashes from time to time, and I would
I have a custom image preference in my Live Wallpaper that allows a user
I'm developing a Live Wallpaper that requires the screen to be of certain features.
I have created a simple image slider 'Live Wallpaper' that will call in an
I recently worked on a live wallpaper application. In that i found out my
I have to draw a circle in live wallpaper when it touches the boundary
I'm extracting Android Grass live wallpaper code from the Android source. I have put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.