Capture android screen for text - android

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.

Related

Get screen content in Android (not take a screenshot)

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.

Split-Screen in Android App Development

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.

How do i include touch swipe? Dynamically load cross platform content and decrease page load times

The idea is to build a website which can grant a mobile and desktop user the full experience. 'The full experience' meaning the use of jquery.
The most important thing is accessibility, so I'm wondering if their is a cross platform way to build a slider/carousel which supports text, links and most importantly touch swipes.
To improve speed, I'd much prefer to load the slides seperately. I understand ajax maybe the solution.. but haven't a clue how. Can anyone direct me towards any basic tutorials that cover this?
A follow up question to the last.. Is ajax safe for dynamically loading content onto mobile devices too?
Also in terms of website layout. Most of the layout will change depending on css media rules when the page is resized. But there are a few elements that will need to teleport depending on the size of the screen.
I considered creating separate elements that would be hidden and shown with jquery/css, but not particularly liking the sound of the code being loaded when it's not needed.
This is slightly different to the sliders in the sense that this code needs to be instantly responsive if the screen size changes (for example, a tablet user changing from portrait to landscape.. or a desktop user zooming in.)
I just don't like the sound of code being loaded if it's hidden.. what is best practice for this?
Again the questions are..
How can i go about building a cross-platform slider, that allows text,links and touch swipe (literally have no idea where to start with touch swipes.)
How can I dynamically load content? (with ajax)? Will this work with smartphones too?
Do people load 'layout' code (on page load) that is only visible if certain parameters are met (eg screen-size.) An example being 2 different menus, one for a small screen and one for a large. Or is there a safe way to load layout code only when it is needed, which would reduce page load times (especially for mobile users.)
thanks
3) touch swipes work the same way as a click + drag, so you should be able to use the same code for mobile and desktop. Here is a great example of this: http://scripterlative.com/files/dragdivscroll.htm

take picture from device screen content (not a view) programmatically in android app

i'm developing an app and need to make Activity that take snapshot from current content of device screen.
note: i dont want take picture from my activity content or some view, i want take a picture from all of device screen content. ( like home screen or every applications that are on foreground). i googled many times and search so much.
there is an example code:
View screen = (View)findViewById(R.id.screen);
screen.setDrawingCacheEnabled(true);
bmScreen = screen.getDrawingCache();
showBitmap(bmScreen); // function that show my bitmap image
with this code can capture my activity's view, but i dont want capture onlye my activity. i want make a thread that capture device screen with all of its contents.
can everybody help me please?
You can't do this, mostly for security reasons. If this were possible, some rogue app could silently capture and send somewhere screenshots of everything you are doing on your device.
Why this is not available to non-system apps:
Android let's SDK applications do certain things, and explicitly forbids others. An app is not supposed to read another app's data and similarly an app cannot capture another app's screen. Google has explicitly said that third party apps are not supposed to take screencaptures of other apps. The lack of screen capture API's is a deliberate decision, not an omission. ICS offers screenshot functionality, but it is implemented by the system, and requires a hardware trigger in order to make sure it cannot be started or accessed by third party apps.
While there are ways to do this, they either require root (to read the graphics buffer directly, which is device-dependent), or are not guaranteed to work on all devices/versions.

Android Display content through the Video-out

Does Android have the software capabilities to, if a phone has video-out, to open or push content solely to the video out.
So for example if the user is in and clicks on a YouTube link, the app, instead of opening the content on the main screen over the app it would push it to the video out so the YouTube video would display on their connect display and they could continue to browse.
I know Motorola's have the WebTop software and this idea is similar to what I am trying to accomplish but on a much more basic level. It's more similar to Apples AirPlay but much less complex again (without a network/external player - just video out).
Or if even that is to complex an even simpler solution of having the video-out still output even when the phone is locked. Currently the video-out mirroring on both my HTC Incredible and Galaxy Nexus will stop when the phone is locked.
EDIT:
I've noticed while using my phone that playing a video through the Google Videos app that on the phone controls will overlay on the screen i.e. play, pause, seek bar, and, the soft buttons, but the video-out display (Television) plays the video continuously/seamlessly without any of the controls over-layed. Now this is very primitive example of what i'm ultimately alluding too but it does show a real world example of an android device (no 3rd party manufacture software) doing video out that isn't exactly mirroring.
Well... I hate to furnish this as an answer, but it really looks like there's simply nothing in the API for it at all...
http://groups.google.com/group/android-developers/browse_thread/thread/9e3bcd1eea2c379
which just redirects to:
https://groups.google.com/forum/#!topic/android-developers/Jxp_9ZtzL60
I'm definitely going to favorite this question, and hope someone chimes in with something more useful than a "doesn't look like it's possible, though that does appear to be the correct answer, at this time.
Much like Dr.Dredel has mentioned, there is nothing current for multiple displays in terms of display 1 showing 'A' and display 2 showing 'B'
There is support for multiple screen sizes per the following:
http://developer.android.com/guide/practices/screens_support.html#support
This will be the case for a little while longer until someone creates the support for it.

Categories

Resources