I want to display a custom incoming call screen. But sometime my call screen is covered by system call screen. I want to overlay system call screen. There are so many UI component in my custom call screen. Should I use activity/fragment or any other component to display custom call screen?
Related
I've created an application which shows a dialog when phone receives a call from a number starts with particular string. To achieve that I created a transparent activity and created a dialog like UI. It works fine on the emulator because emulator shows stock caller UI. But for the real devices it has a full screen UI for the caller screen which hides my transparent activity. Is it possible to bring that activity in front of the caller screen.
I solved this issue by getting request from user to overlay on system UI and my transparent activity is overlaying on it
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...
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?
I'm trying to implement tab buttons bar and a navigation bar in my android application. The problem is, that I would like the navigation elements to persist. When starting a child activity, the nav bar moves.
How can I make these two elements "non-movable"?
Add button bar and navigation bar to all your activities and share it's state via static fields. Remember to initialize bars when child activity starts and update parent's bars when child activity finishes (either via onResume or as a result of startActivityForResult).
It is not possible to share instances of UI elements between activities, as Activities are (by design) independent of each other.
Application cannot control how new activity is introduced - it can slide, zoom in or just show up if user disable animation in device preferences, UPDATE: it looks like since API Level 5 there are ways to override this, please refer to Activity transition in Android . But if you really need to keep bars in place, use single Activity and replace main view content with animation you like.
What's the best way to create a reusable loading screen in Android? The loading screen should have a background image and a loading indicator.
Should I use a separate activity?
The best way is using a separate activity with a SurfaceView that shows the image. Then, you can create an overlay that contains the ProgressBar.
You just could define your own dialog with custom layout. You would handle what happens if your progress screen gets cancelled (pressing back button). You could also prevent it from happening too.
By using an standard dialog you take adavantage of nice efects (background activity darkening with upgrades) and prevents user from interacting with background activity while it is on.