How pass taps outside Qt app window in Android? - android

I make application on C++/Qt for Android. It has only one QMainWindow and one Activity. But the window is smaller than screen size. It is placed in top left corner. I get events in window but I cannot find the way how pass events to activities visible outside my app window. Looks like window is modal. How can I solve this for Qt application?

Related

How to get the Window of InputMethod on Android

In order to collect user's keystroke features on our App, I have to collect the touchevent(or just the click timestamp) on the input method view(soft keyboard).
1)As far as I know, the window of the soft keyboard is distinct from the window of the Activity
2)As long as I could get the window of a view, I can intercept the touch event of this window.
So is there a way to get the window of the soft keyboard?
As far as I know, the keyboard window belongs to system UI, like status bar or notification window; a common app has no access to such system windows in Android framework.
However you may try something tricky to to see if it would achieve your purpose: When the soft keyboard is launched, you can calculate its height and then create a new transparent window, like PopupWindow, with the same height covering the keyboard. This way you may be able to intercept the touch events on the keyboard without blocking them.
=== Updated 21/12/2018 ===
Please note that all windows in Android are actually implemented the similar way in ui framework. i.e. Your app's application window, InputMethod, Status Bar, Notification Bar... are all windows each with a flag to indicate the window type (read here). In short, window type will decide the window z-index when being rendered on the screen. They are categorised as Application Window, Sub-Window and System Window.
With that being said, PopupWindow is just one of them, a handy helper window provided by Android system (with a smaller z-index against the InputMethod window's). Just try to create your own window using WindowManager.addView() with some window type flag greater than the InputMethod window (which might be carrying a flag of TYPE_INPUT_METHOD).

Android - detect gesture across entire device

I found some methods to launch an application by putting button on top of entire device. This should be available even if the application is not in main activity.
Gesture Listener across entire device
Creating a system overlay window (always on top)
I wanna do little a different launch an application by specific gestures, (e.g. swipe gesture starting from bezel) without putting layouts or buttons on top of screen.
Is there any suggestions?

Show Caller Location On Incoming Screen

I am developing an app which the Location of Caller on Incoming call Screen.
To show that I used Toast, But I came to about ann App which does this but not using Toast.
It uses something else to show something on Incoming Call Screen. I want to know what is that control.
The screen shot is attached here
As you can see in the image. I want to know about the control or View (that is in red Line Center).
This particular contriol can be dragged up and down and can be closed on clicking cross button
How to create this control.
you can use system overlays to put a view on top of all the screens..
check out following post for more info:
Creating a system overlay window (always on top)
Creating a system overlay where the home buttons still work?
AirCalc is one more proof of concept...

How do I implement a slide-out drawer on the Android's call screen?

The Android app Thrutu puts a drawer on top of the in call screen which has several functions and only takes up a fraction of the screen. The call control buttons below still are fully functional. Even a transparent activity would not allow this behaviour. Any idea on how to implement this?
The trick to making the underlying buttons work is to implement the UI using a Service rather than an Activity, make the Window you add (using WindowManager.addView) one of the higher-priority types (e.g. TYPE_PHONE), then use FLAG_NOT_TOUCH_MODAL.
I think you need android.permission.SYSTEM_ALERT_WINDOW.
Take a look at How to display a fullscreen TYPE_SYSTEM_ALERT window? and in particular Creating a system overlay where the home buttons still work?

Android : Floating Clickable Icon over Screen?

There's an Android Application called Smart Taskbar that manages to Pin a small SemiTransparent Icon over the screen...The icon remains visible over ALL the activites (including the home screen). The Icon is Clickable (/Touchable), and it does popopen a Small Popup window which the user can interact with.
I'm very interested in how this is done? I think it's something to with PopupWindow.
Any ideas? Thanks in Advance.
I recently experimented with this.
See this question: Creating a system overlay window (always on top) - the solution is virtually the same, but you need to set TYPE_SYSTEM_ALERT in the layout params instead of TYPE_SYSTEM_OVERLAY.

Categories

Resources