I'm looking for a way to get the contents of the screen in android but not for taking a screenshot.
A little background, I recently broke up with someone and want to create an app that will "censor" photos of her (ie: just pixelate them). I know how to write a training algo to be able to detect her, and I can write a service in Android that will just run in the background, but I've not yet come across a way to get the screen contents. My thought was to look at the screen and if she shows up in Instagram, texts, or any app, just pixelate that portion of the screen (or put a black square over it or whatever).
Unfortunately the android docs haven't helped me much, so does anyone have any experience doing so, or can you point me towards any thing that would help?
I'm not sure if this is a violation of any rules, so if it is, my humblest of apologies, I'm just stumped and feel free to mark this closed.
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.
I am trying to take a screenshot of my android device programmatically.
I have found dozens of Questions and posts, years old and not current. For example:
How to programmatically take a screenshot on Android?
The Approach works in the way of taking a screenshot of my main application window. But I I want to take a screenshot of the whole device including other apps!
example:
Instead of the "Internal Storage" + Control overlay, the original app is recorded or alternatively, the tiny view of the control overlay.
Anyone an idea on how to record the current screen? I'm fairly sure there must be solutions as there are apps out there such as the following screen recorder:
https://play.google.com/store/apps/details?id=videoeditor.videorecorder.screenrecorder&hl=en
I have looked around but, I am unable to find an answer to my question. Basically, I am creating a phone app. The only problem I seem to be having is with the menu UI. Basically, it is set to a 1080x1920 resolution, which is probably the most common one out there. However, it is not the only one. How do I handle multiple screen resolutions? Do I need to make like separate widgets for each resolutions and load in the correct one based on that? Or is there some other way that I am just not aware of. I am sure that others have come across this same problem too.
The reason I bring this up is because I have loaded the app onto a phone that is not 1080x1920 and the UI doesn't fit inside of it. I have tried messing with different settings on the UI but, nothing seems to fix it. Any help would be greatly appreciated.
There were two problems that were happening. The first reason why the UI wasn't scaling properly was because I was using a Size Box instead of just a plain Canvas Panel. It didn't matter what I did, the Size box would remain the same. Changing that would solve the first problem. The second problem that was happening was that because of the size box it forced my anchors to be centered instead of stretched. Once I replaced the Size Boxes with Canvas Panels I was able to make my panel anchors stretch to fill the screen.
I hope this helps anyone else that comes across this problem.
Im trying to build an app that can copy and save all text that user selected in any othe apps such as chrome, adobe reader, sms .....
In fact I have no idea how should I do that or even is that possible or not
I will be thankful if any one can help me.
The Accessibility API allows you to investigate the view hierarchy displayed on the screen and read text from different views. On top of that, you may be able to fetch the coordinates of where user tapped (maybe by using some kind of system overlay view) and translate them to the position of text the user most likely wanted to copy. Note that if this even works at usable level, will be very hacky and most likely making it work across considerable number of devices will be hard.
I was wondering if there was a way I can have part of my screen in android constantly display something, even something as simple as a piece of text or an image. I am fairly familiar with Android Development, so if there is a way to make an app that does that, it'd be great.
To be precise, I want the top third of my screen to stay constant, and the bottom two-thirds to work normally such that I can do anything I can normally do
Edit: I want the top third to display the constant text/image even if I exit the app. A widget is a good idea. I'll look more into that.