android-windowmanager

Android Activity Not Showing When Screen is Woken Up and Lock Screen Not Disabling

一曲冷凌霜 提交于 2019-11-30 20:20:28
I have a BroadcastReceiver that starts an Activity . If the Activity is started while the screen is on, it displays and everything is fine. However, on ICS and JB devices (I haven't tested GB or HC but the issue doesn't exist with Froyo) if the Activity is started while the screen is off, the lockscreen is not disabled, and the activity is not shown when the phone is unlocked (either through unlocking it manually or with the code I put in for post Froyo devices). Why, on at least ICS and JB devices, does the lockscreen not get disabled without the mentioned code below, and why doesn't the

Getting window display from service android

房东的猫 提交于 2019-11-30 19:50:31
I am trying to display a window from service but don't getting it how to do this Here is my code-- In onStart method of Service LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(R.layout.main1, null); WindowManager manager = (WindowManager) getSystemService(WINDOW_SERVICE); WindowManager.LayoutParams params = new WindowManager.LayoutParams(); params.type = 2002; params.format = 1; params.flags = 40; params.height = WindowManager.LayoutParams.FILL_PARENT; params.width = WindowManager.LayoutParams.FILL_PARENT; manager.addView(view,

IllegalArgumentException: Window type can not be changed after the window is added

﹥>﹥吖頭↗ 提交于 2019-11-30 17:08:08
I've tried the advice here , the advice here , the advice here , I've commented out the onAttachedToWindow() in my Base Activity. I have two Activities inheriting from this class, BaseActivity. One runs, and one does not. What could be the difference? My target SDK is 19; changing it to 12 makes no difference. Here is my onCreate for BaseActivity: @Override protected void onCreate(Bundle savedInstanceState) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);

IllegalArgumentException: Window type can not be changed after the window is added

空扰寡人 提交于 2019-11-30 16:27:38
问题 I've tried the advice here, the advice here, the advice here, I've commented out the onAttachedToWindow() in my Base Activity. I have two Activities inheriting from this class, BaseActivity. One runs, and one does not. What could be the difference? My target SDK is 19; changing it to 12 makes no difference. Here is my onCreate for BaseActivity: @Override protected void onCreate(Bundle savedInstanceState) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager

add View by using WindowManager, but can back key press

送分小仙女□ 提交于 2019-11-30 15:43:40
I've add a View, by using WindowManager. It shows properly what I wanted to do, but I have a problem. this is the problem. back key press doesn't affect under android component(like activity) what I want is my added view can focusable, ( can click the view's inner button ) only when click the view, and outside of the view can process their work. ( for example, if there is a button, can be clicked, and when back key press, top activity was gone ) but if I add a flag - WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, then I can't receive onClick method on my added view's button. but back button

WindowManager$BadTokenException unable to add window

耗尽温柔 提交于 2019-11-30 06:01:22
问题 I am developing app for background videorecording ,thats why i used WindowManager,but it did not worked for me.gives following errors: 08-23 15:38:21.021: E/AndroidRuntime(4200): java.lang.RuntimeException: Unable to create service com.example.prankapp.BackgroundVideoRecorder: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@418c0b68 -- permission denied for this window type 08-23 15:38:21.021: E/AndroidRuntime(4200): at android.app.ActivityThread

Android Activity Not Showing When Screen is Woken Up and Lock Screen Not Disabling

人盡茶涼 提交于 2019-11-30 04:13:57
问题 I have a BroadcastReceiver that starts an Activity . If the Activity is started while the screen is on, it displays and everything is fine. However, on ICS and JB devices (I haven't tested GB or HC but the issue doesn't exist with Froyo) if the Activity is started while the screen is off, the lockscreen is not disabled, and the activity is not shown when the phone is unlocked (either through unlocking it manually or with the code I put in for post Froyo devices). Why, on at least ICS and JB

what does exception java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@4205eb18 does not exist mean

北城余情 提交于 2019-11-29 16:30:19
问题 I am trying to login into the app but after the login is success and it is about to go to next screen, it restarts. Following is the exception that I guess would have caused this, as there is no other exception. 11-14 15:09:54.841: W/WindowManager(643): Failed looking up window 11-14 15:09:54.841: W/WindowManager(643): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@4205eb18 does not exist 11-14 15:09:54.841: W/WindowManager(643): at com.android.server.wm

what does exception java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@4205eb18 does not exist mean

倖福魔咒の 提交于 2019-11-29 03:05:49
I am trying to login into the app but after the login is success and it is about to go to next screen, it restarts. Following is the exception that I guess would have caused this, as there is no other exception. 11-14 15:09:54.841: W/WindowManager(643): Failed looking up window 11-14 15:09:54.841: W/WindowManager(643): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@4205eb18 does not exist 11-14 15:09:54.841: W/WindowManager(643): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7622) 11-14 15:09:54.841: W/WindowManager

Keeping track of View added to WindowManager (no findViewById() function?)

允我心安 提交于 2019-11-29 02:18:39
问题 In my service I add a view to WindowManager with addView() . When I'm ready to hide the view, I call removeView() using the View reference. This works great -- most of the time. I have occasional Force Close reports that say that the View is not attached to the WindowManager . This makes sense. The problem is that I think the service is getting killed by Android, and when it is time to hide the view, it attempts to removeView on the wrong View . I have tried checking for the View to be null,