I want to capture the pointer locations in whole android device by providing a service to develop something like Pointer Location in Developer options .
First I have tried addingoverlay view which is always on top to capture the coordinates . but this method didn't let me to get touch events in move actions .
So I decided to try another way . At last I found that for rooted devices , we can get touch events but I don't know how . Could you please give some suggestions ?
thanks in advance
I have been looking for this answer as well. Can you specify how you did the overlay view and captured the coordinates?
I was able to do the overlay as well, with some other answers from here on stackOverFlow, but if I capture the Overlay coordinates, it renders the background/OS useless. Its one or the other, not an actual service in the background running or an overlay recording coords. Its one, or the other.
I have read that this goes against the Android security framework, since it would be a really big flaw when exploited. Although, everything that I have read is from 2012 at the earliest. This is the newest post in 3 years. Any insight?
Related
I am writing an AR Android application in which I scan QR codes (using the Google Mobile Vision Barcode API) as a trigger and then render objects into the camera view.
As there may be more than one QR code at the same time, I want to access the location of each code on the screen, so that the objects will be rendered on top of each code. At the moment - if there are two QR codes being detected by the camera - the objects will be placed at the exact same position in 3D space.
Example:
There are two QR codes being detected by the camera, one on the left
and one on the right of my camera view. Right now, both objects would
be rendered in the center of my camera view, as this is the default
value of my app.
I want the object related with the left code to
appear on the left and the object related with the right code to
appear on the right.
I have tried calling Barcode.getBoundingBox().exactCenterX() and [...].exactCenterY() to get a rough value of the code's location, but it does not work out well. Unfortunately I can't find a more suitable method in the documentation.
I can't be the only one who needs the code's location on the screen. How did you guys do that?
Thanks a lot.
I'm trying to add multiple views when detecting QR code. I need to show one button, one image and one text when QR code is recognized. I use metaio SDK-Template project and for now I'm only able to show one thing at a time.
Can someone please point me in right direction?
when you use metaio for detecting QR codes you're lossing the concept of augmented reality because you are scanning for a QR code and you wont be able to set a 3d model into your target or make visible and enable view components on the UI, if you have concerns about the objective about augmented reality foundamentals check the metaio documentation and examples at dev.metaio.com. Regards
I am working on a research project.The scenario is this.
I am taking the screenshot of my desktop and then I process it using an API to get the position of a certain text on my Desktop.e.g , say I have the browser open on my desktop and I am on stackoverflow.Now I want to search the position of the logo stackoverflow on the screenshot taken.Then I want to simulate a click on it.I am using Java platform.
Now I have 2 questions:
1)Is there any free API(OCR) which I can use to process the screenshot to fetch text position (or can be done by some trick) and gives good results.
Or Any way you can suggest that I can use (instead of taking screenshot and processing it) to get the position of any text on the screen.
2)How can I simulate the click on the screen using the code by a background program running(I mean I have done it in Swing and other language UIs but this time its different as Now I want to click on the screen.
If I understood you right you want to move your mouse and click on the screen. That not that hard you could use the robot class from Java!
For example:
Robot rob = new Robot();
rob.keyPress( KeyEvent.VK_ENTER );
or what ever, there are so much bottons and movements you could with it. A list of all methods you find here.
And your other question I can't answer. I think there is no API that is able to search a text and give you the position. But what I know is that the robot class is able to capture the screen and put it into a BufferedImage. With it you could compare two pictures.
Maybe you could get use of this but I don't know if it is what you search.
My function must take picture from camera at the current time I will call him , and keeps it in my buffer , non anywhere else . I don't need to open camera , to push it's "capture" button , I need to do all this automatically. user must not see , that camera is working , and after taking the image , it must copy it only in my buffer . Don't suggest to use camera.start() and after copying video or picture , delete it from Gallery please. Can anybody helps me? and Sorry for English :)
This is the solution to your problem. Just edit it a little. You can store the bitmaps in an ArrayList for example.
But you know that this is bad for performance as it'll flood the memory? Writing it to the sd is probably a better idea than using the internal memory.
Edit: When using the API, you have to show a preview. You can, however, make this preview 1x1px or hide it behind some other view. And you can modify the code a little bit to not have the capture start on a buttonclick, but on whatever you want. I take it you can do that.
This can also help a lot
As far as i know, You will not be able to capture the image opening the camera application without the knowledge of the user.
The company I work for has an java application that runs on esmertec jbed JVM on windows mobile 6.
There is a requirement to capture a user's signature as part of some new functionality. One option is to try and implement this in java. This has been tried previously and has been found to be a bit slow.
I think the better option would be to get a native component to handle the drawing of the signature and save it to file. Does anyone know of a component that I would be able to use?
Creating our own component is an option as well but if there is one available already, I would prefer to use that.
For completeness, I'll answer my own question.
I could not find an existing component that done this. We ended up writing some c++ code that would handle this.
The code would get a handle to the Java canvas and register our own callback function with it. This callback function would record any mouse movement within the canvas and draw a line when necessary (either on mouse up or after a number of points had been drawn). Once the user leaves the screen we would save the canvas to file and re-register the original canvas callback function.