Is it possible a mobile app working like a background process to blur or fade the screen of the smartphone, no matter what active app is being displayed? Does the android and ios APIs expose such features?
Definitely not on Android. There are accessibility services which do modify the screen regardless of which app is visible but those are mostly first party applications. It would be a pretty big security risk issue if apps could block/blur the screen of other apps.
That being said you can create an overlay which lets touches through. I'm not sure if you can get the actual pixels of the UI behind the overlay and run a blur yourself but you can draw over top of elements on the screen (using accessibility APIs you can get the positions of UI elements) which may suit your needs depending on what exactly you're trying to achieve.
Related
I'd like to create an Android app that can modify the whole display, even when the app is not being used directly. This is one example of an app that seems to do this.
Ideally, I'd not only want to be able to tint the screen, but to perform arbitrary operations on the pixels being shown on the display, ranging between making the entire screen a solid color, inverting the colors (so that e.g. black becomes white), and blurring the screen. (I could imagine this level of access in the wrong hands could make somebody's phone unusable, so maybe not all of these are possible.)
Any pointers on how to do this?
You want to let your app draw over other apps. There is a special set of requirements for such applications.
Take a look here and here.
There is also a simple tutorial.
And an opensource app, that looks pretty similar to one you've linked above.
Is it possible for an android app to run in the background, listen to specific triggers and modify the visible application content in the screen (in both system and third party apps)?
For an example, A 2 finger tap should lead to a ripple effect on the screen. If the temperature is high, The screen turns more reddish. If I say "do a barrel roll", The entire UI does a "barrel-roll" like the google Easter egg. And this should happen whether the user is in the homescreen, settings or his Instagram.
The best working example I can give is the built-in "Magnification Gesture" provided by Android. Three taps anywhere will zoom everything up except for the keyboard and the navigation bar. And it doesn't zoom as an image, the touch points are preserved.
Is this possible to do without or with root? Do I need a framework like Xposed?
Thanks.
In Android , Is it possible to display one application(rendering Video) as a floating screen in one half of the screen. and at the same time interacting with another application(e.g chat application or any other application. ).The floating screen appliction will be my application so that it will allow the user to do multitasking.
The idea is to keep the surfaceview of the application, which is rendering the video, on top, and at the same time interact with other applications.e.g gallery or any other application..
If by "two active applications" then you mean real applications (i.e. with activities, back stack, &c) active at the same time, then no (except in some specialized devices, with custom APIs).
However, there is a trick you can use to achieve a similar effect. Applications with the android.permission.SYSTEM_ALERT_WINDOW (displayed as "draw over other apps" in Play Store) can create windows from a service and show them. So you could probably get the effect you want with this method.
There is an open source library called StandOut which provides this behavior in an easy to use manner. You might want to take a look at it.
In short, the answer is no. There is no way currently for multiple apps to be visible on the screen at the same time.
You could theoretically reuse code over multiple different applications, so you could create a video window that could play video, while simultaneously showing a text editor fragment that allows notes to be taken, and you can send data between different applications using an Intent, but unlike modern desktop computers, only one application can currently have the focus of the screen at a time in Android.
In Android , Is it possible to display one application(rendering Video) as a floating screen in one half of the screen. and at the same time interacting with another application(e.g chat application or any other application. ).The floating screen appliction will be my application so that it will allow the user to do multitasking.
The idea is to keep the surfaceview of the application, which is rendering the video, on top, and at the same time interact with other applications.e.g gallery or any other application..
If by "two active applications" then you mean real applications (i.e. with activities, back stack, &c) active at the same time, then no (except in some specialized devices, with custom APIs).
However, there is a trick you can use to achieve a similar effect. Applications with the android.permission.SYSTEM_ALERT_WINDOW (displayed as "draw over other apps" in Play Store) can create windows from a service and show them. So you could probably get the effect you want with this method.
There is an open source library called StandOut which provides this behavior in an easy to use manner. You might want to take a look at it.
In short, the answer is no. There is no way currently for multiple apps to be visible on the screen at the same time.
You could theoretically reuse code over multiple different applications, so you could create a video window that could play video, while simultaneously showing a text editor fragment that allows notes to be taken, and you can send data between different applications using an Intent, but unlike modern desktop computers, only one application can currently have the focus of the screen at a time in Android.
I was wondering if is it possible attach a widget to the main Android background/wallpaper/desktop?
I want develop something like a clock, actually It's a very simple widget that have three buttons. This is quite different from another desktop-widgets-like, all the widgets that I've seen are like a customization of the Android wallpaper, or a customization of the Android unlocker, but this is rather different.
If it is possible, do you know some sample code source?
Not sure what "background/wallpaper/desktop" really means, as "background" is too wide term, "wallpaper" may be either static bitmap or live wallpaper, "desktop" means nothing on Android (did you mean Launcher by any odd chance?). If you meant live wallpaper, then you cannot have full functionality in Live Wallpaper you have on Launcher, but if "three buttons" means you want to allow user to tap certain area and react on this, then it should be not a big problem - you can use onTouchEvent() to receive taps from user and act accordingly. If you meant Launcher then well, "yes". For any other options "no" or "most likely no"