Questions tagged [android-windowmanager]

The Android WindowManager is a system service, which is responsible for managing the z-ordered list of windows, which windows are visible, and how they are laid out on screen.

The Android WindowManager is a system service, which is responsible for managing the z-ordered list of windows, which windows are visible, and how they are laid out on screen.

Check the official WindowManager documentation for more details on the contract interface.

565 questions
0
votes
0 answers

onDoubleTap not working in GestureDetector.SimpleOnGestureListener in CustomView

I have created a Custom Button that work like ChatHead and also like to handle Single ,Double and LongPress on the custom Button. All other gesture working fine except onDoubleTap(). I have created a customView all work is done in that class. But…
Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300
0
votes
0 answers

android.view.windowmanager$badtokenexception unable to add window -- token null is not for an application

I have researched this error on StackOverflow and tried all the suggestions but still have the error. App tries to load and I can see the home screen behind several of the alerts and an error that the app closed. Things I've tried: adding to…
MiGo
  • 1
  • 2
0
votes
2 answers

How do I use WindowManager to overlay an Activity?

How can I have an activty overlay like the one used in Facebook Messenger using the WindowManager? This is what I want This is what I have so far first widnow manger thats who have chatheads bubble params = new WindowManager.LayoutParams( …
0
votes
1 answer

A blank white screen appeared when addview to windowmanager

I am doing a simple lockscreen using the addview in windowmanager, although i successfully added the lockscreen view but before the view is added, a white annoying page being added before the view is displayed. i tried to set the view background to…
0
votes
1 answer

Unable to add window -- token android.os.BinderProxy

Below is my utility method for showing alert dialog in my application private void displayInternetAlert(final Context context) { if (!((GlobalActivity) context).isFinishing() && context instanceof GlobalActivity) { …
Hardik Mehta
  • 867
  • 1
  • 12
  • 20
0
votes
1 answer

Android: Receiving touch at the bottom views

I have a fullscreen layout added to the windowManager. In the layout, I have a few controls e.g. a keyboardView. The keyboardView can listen to touches but anything behind the layout can't receive any touch even though some area of the layout is…
LittleFunny
  • 8,155
  • 15
  • 87
  • 198
0
votes
1 answer

Keyboard height on Android

I'm getting the keyboard's height on Android by implementing a ViewTreeObserver.OnGlobalLayoutListener by doing: final Rect r = new Rect(); mRootLayout.getWindowVisibleDisplayFrame(r); int screenHeight = mRootLayout.getRootView().getHeight(); final…
0
votes
1 answer

Android MotionEven.Action_MOVE

I have the following snippet of code (From this chathead tutorial), the point of the last switch case is to handle the drag on the view, but I can't quit understand how the logic works : ... params.gravity = Gravity.TOP |…
Omar BISTAMI
  • 770
  • 2
  • 11
  • 19
0
votes
3 answers

Unable to add window -- the specified window type is not valid

I keep receiving this exception, when i try to create a system wide overlay using a WindowManager and the corresponding permission: Unable to add window android.view.ViewRootImpl$W@6b3c898 -- the specified window type is not valid My Code (run…
Rico Chr.
  • 131
  • 1
  • 9
0
votes
2 answers

Why custom dialog is not working on API 23?

I am facing one issue on custom dialog box on API 23, it's crashing. final Dialog dialog = new…
Anshuman Pattnaik
  • 143
  • 1
  • 1
  • 7
0
votes
1 answer

Show activity on ringing screen when device is password protected

I am trying to develop an android application which will show the caller's information on call received. My code works fine. but when the device is password protected and then call is received the user has to first enter the password and then…
0
votes
1 answer

VideoView does not play video when added to the Global Layout using WindowManager

I didn't find a similar question nor the answer to it, so I decided to post a new one. I have created a custom RelativeLayout, which plays a role of a wrapper of the content layout which is inflated and added to the wrapper during the initialization…
0
votes
1 answer

prevent activity from receiving touch events when screen display is off

I'm setting my screen to be always awake in order to preventing it from going into sleep mode at all. hence, when the screen display is turned off, the user has to touch the screen in order to bring it on again, but the problem is that this touch is…
Muhammed Refaat
  • 8,914
  • 14
  • 83
  • 118
0
votes
1 answer

How to translate windowmanager floating layout diagonally with animation? (ChatHead click animation)

I'm trying to implement chatheads in my application. I've managed to get everything working, onClick the custom layout opens which is a relative layout with a webview and some buttons. The chathead moves to the top right corner when its clicked…
0
votes
1 answer

android.view.WindowManager$BadTokenException

I custom notification in application by use windowmanager to addview. android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@74b2eff is not valid; is your activity running? at…