Android :: How To Capture Action_Move MotionEvents In A View
Jan 27, 2009
If I setOnTouchListener for a view the only events I get are ACTION_DOWN events. What do I need to do to capture ACTION_MOVE events which should occur when the user drags a finger across the view?
View 3 Replies
Jan 20, 2010
I have an activity defined as:
CODE:...................
View 3 Replies
View Related
May 12, 2009
What I want to carry out is that the handle of the SlidingDrawer will be dragged by my finger, and when My finger leaves the screen, the handle of the SlidingDrawer will be just stop there and don't slide to top or bottom.
View 6 Replies
View Related
Sep 11, 2009
I decided to start pipelining input to increase responsiveness in my games. Basically what I do is when the activity receives a Key or Motion event, it sends it to a feed method in the game, which encapsulates it with a time and whatever else I need and puts it in a queue then immediately returns so the UI loop is never held up waiting for long. The main loop later processes the queue, applying the events in it at the appropriate times.
This works great and makes the games snappy, although now I'm starting to miss touch events intermittently. I realized that the events could be recycled objects and that could make them not safe to queue. Is this the case or is it safe to queue them for deferred processing like I'm doing?
View 5 Replies
View Related
Jun 29, 2010
I am curious about the safety of this method I have considered using for passing touch events in my Android application (and testing my understanding of concurrency in Java). Here's the basics:
I have a SurfaceView hooked up to SurfaceHolder.Callback to get user input events, mainly the onTouchEvent callback. After the onTouchEvent method is invoked, I see if event.getAction() == MotionEvent.ACTION_UP and, if so, call a method I have named postTouchEvent which is a member method of my app thread that updates the application's state and draws to the canvas. Code...
Now I understand that it is certainly not atomic, but since I treat it as immutable after receiving it from framework, won't this work? (Instead of synchronizing the post method and the if statement, which I have no problem doing, but I'm asking to learn.)
Here are my thoughts. I know I will have a valid reference to the object but I am unsure in what state I will actually see the object. While testing everything is working out just fine but I am aware of how uncommon threading exceptions can be, even if something is broken.
Also, I can see one problem with this: If another MotionEvent comes though, it's possible that inputEvent in the run() method will be set to a different event than the one that was referenced when this.mInputEvent != null was checked, but this really isn't an issue.
So, is there anything I am missing or, for my purposes, should this be ok?
View 2 Replies
View Related
Aug 2, 2010
I am trying to set up a ViewFlipper that changes a SlidingDrawers content each time a button is pressed. So far every view I set up worked fine, but now I am trying to create a ListView (including single_choice_mode) within a child view of the ViewFlipper, but my attempt only let to a NullPointerException. As I only discovered ViewFlipper today, I am not yet familiar with it and may not have understood it completely. if someone could give me a hand and help me find out what I have done wrong, that would be great. Here is what I have done:
The code for the onClick event of the ImageButtons:
public void onClick(View v){
if (v == btnExposure){
mFlipper.setDisplayedChild(0); }
else if (v == btnProperties){
mFlipper.setDisplayedChild(1);}
else if (v == btnSpecialEffects){
mFlipper.setDisplayedChild(2);.............
View 1 Replies
View Related
Sep 7, 2009
I want to use screenshot kind of application in my own application. So that I can take picture in any format and save it. There is one function getDrawingCache() which does that, but it only save picture what is available on the screen. It does not capture beyond screen if the picture is big.
View 2 Replies
View Related
May 21, 2010
i had an interview this morning for a job, and have an opportunity to earna great deal of brownie points with the business owners.They were thinking of purchasing some sort of electronic signature capture device (like fedex or UPS has when you sign for a package) for invoices.. BUT.I also mentioned my Droid Eris and how it can do so much. Turns out, both of the Owners have DROIDs lol.Anyways.. I want to know if anyone has seen some sort of application that can capture signatures, and either save an image to be emailed, or email directly from the app.OR does anyone know a DEV that could create something as simple as this, that I can talk to and relay updates on the APP to the owners of this company.They seemed really interested in it, and I'm pretty positive it will show a good bit of initiative in saving their company money from the get-go (on my part)
View 10 Replies
View Related
Jun 23, 2009
I would like to create a video recorder and so far haven't figured out how to set parameters in order to successfully go through MediaRecorder.prepare() method. Executing the following method
public void start() throws IOException{
String state = android.os.Environment.getExternalStorageState();
if(!state.equals(Environment.MEDIA_MOUNTED))
{
throw new IOException("SD card is not mounted. It is " + state + ".");
}
File directory = new File(path).getParentFile();
if(!directory.exists() && !directory.mkdirs())
{
throw new IOException("Path to file could not be created.");
}
recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
recorder.setVideoFrameRate(15);
recorder.setVideoSize(176, 144);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start();
this.state = VideoRecorderState.STATE_RECORDING;
}
it throws an exception on line recorder.prepare(). Does anyone know how to set parameters in order to be able to capture video?
View 7 Replies
View Related
Mar 5, 2009
I'm having trouble getting a screenshot. I installed the SDk, Eclipse, the drivers, enable usb debugging, like the instructions say. I open DDMS and it recognizes my phone without any problems. When I try to do a screen capture, it says screen not available. In the command box it says "timeout" and "truncated reply from ADB fb data". Does anyone know what I'm doing wrong?My phone isn't rooted and is running RC33. I'm running windows vista on my computer.
View 3 Replies
View Related
Jun 14, 2010
i was wondering if any of you had suggestions for a screen capture app that didn't require the SDK. If it didn't require me to root my phone that would also be a plus but i'll take what I can get.
View 1 Replies
View Related
Aug 6, 2009
I want to capture when user press the EndCall key in simulator, but i think i'm doing something wrong cause nothing happens!
My code is:
CODE:......................
View 2 Replies
View Related
Jul 22, 2010
I am working on key capturing events in background. i used Service to send my application back. When the application is in forground i can capture the keys and logged in a file.But when i sent it to background i am not able to get. i am aware of onKey() and onKeyDown(). and also i feel these can only capture the keys when application is foreground.
can anyone please suggest how to capture the keys while application is in background. and also without DDMS how can we capture the screen .Is there any API's
View 2 Replies
View Related
Nov 11, 2009
I was wondering if there is a way to take a screenshot of the current screen inside the mobile phone using a service (I know how to do it through DDMS though)
View 2 Replies
View Related
Mar 19, 2012
I know using HOME and VOICE button can capture the screen without ROOT under 4.0 system, but now I need capture it using API in my code.
View 3 Replies
View Related
Jun 3, 2009
As a first step toward a speech recognition project, we wrote a simple voice recording application based on the information in this thread:
http://groups.google.com/group/android-developers/browse_thread/threa...
It is working; however, the audio is extremely poor too static for our needs. As a comparison, we did a similar audio file captured with audacity on a PC and it was much better. Has anyone been able to record high quality audio with the android dev phone? According to the documentation of MediaRecorder, there is only one audio encoder "AMR (Narrowband) audio codec" and three output formats--3gpp, mpeg, and raw AMR:
http://developer.android.com/reference/android/media/MediaRecorder.html
According to wikipedia, AMR encoding is only 8hz. Is there a better option available perhaps a lower-level API compared to MediaRecorder? We are testing on Windows XP, with a Logitec USB microphone, eclipse ganymede, and we are using all the defaults for an android 1.5 app (no emulator command-line options. We defined the SD card in AVD manager).
View 2 Replies
View Related
Mar 11, 2010
Ive got a rooted Moment and Im trying to use one of the screen capture apps on the market but no matter which one I use all my screenshots come out blank (black to be exact). Ive tried taking a shot of both my GDE homescreens and the default homescreen and it doesnt change.
View 2 Replies
View Related
Feb 24, 2010
I would like to be able to capture the video from an android phone camera, and then process this video. Processing involves adding a layer of AR to the live stream. Is this possible on android? Pretty sure it should be. I have looked at the android site [http://developer.android.com/guide/topics/media/index.html] but this seems to be concerned with video capture and storage. I would like to be able to play with the video pre-storage.
View 1 Replies
View Related
Oct 13, 2009
Android 1.6 supports video capture, however, not all phones will support video capture. Is there a way I can tell if the phone I am running on supports video capture or not?
View 1 Replies
View Related
Nov 19, 2010
One of the alternative app stores is asking for unaltered, unedited capture from the app as a video. Plus I'm also interested in cleaner video than I get by focusing a camcorder on an Android on a table. Who knows how to do that? I think I found some posts that indicate Mark Murphy may have solved this with a tool that goes through DDMS. If so, I'll get that tool and donate.
View 10 Replies
View Related
Jun 18, 2010
Is there an app that captures what goes on my screen?
View 3 Replies
View Related
Jul 20, 2010
I'm trying to capture an image by calling camera utility from "MeidaStore.ACTION_IMAGE_CAPTURE". However, it seems there is only on resolution available 640x480, while the native camera support 8MB resolution.Any permission or extra param needed to get larger resolution option? It'd much appreciated if anyone can help on this.
View 3 Replies
View Related
Sep 8, 2010
I am looking for a screen capture utility that DOES NOT require a rooted phone.HOW IDIOTIC, suppose I want to screen capture as a user, to help a developer do documentation? This is absurd that there's no apps for the rest of us honest users.there's something if I connect it to my PC. C'mon, I don't have to connect my home PC to some other computer to take screen snapshots. I want an app that works on the phone itself, and does not require root access.
View 27 Replies
View Related
Sep 20, 2010
I've got a dispatch/delivery/tracking application running on (ugh) Windows mobile that allows a signature capture.I really want to port this to Android to give my customers another option (thankfully) from Windows mobile devices.Is it possible to capture a signature on the device? What are my options here?
View 4 Replies
View Related
Sep 6, 2010
My requirement is to make an activity which provides user with a screen in which user can input his signs. I want these signs to be then saved as an image in database. Is there any default activity which does similar task.
View 1 Replies
View Related
Aug 20, 2009
Can anyone share or point me to working example of "video capture" with preview?
View 2 Replies
View Related
Jun 30, 2010
Is it possible to capture an image without showing the camera preview?, i have a requirement that i should be able to capture the image from a thread or from a service, without disturbing the foreground application, where i do not want to show the camera preview, but still i want to capture the image in background and store it in the device. So is it possible to do using the Android 2.2 SDK version?
View 3 Replies
View Related
Aug 12, 2010
Continuing with the question referred in the following link: [How can I capture when time changes in a TimePicker if the keyboard is being used?][1]
[1]: http://stackoverflow.com/questions/3380761/how-can-i-capture-when-time-changes-in-a-timepicker-if-the-keyboard-is-being-used/"How can I capture when time changes in a TimePicker if the keyboard is being used?"
I could solve the problem but it only works when you use the actual keyboard. If you use the soft keyboard I can't get it to work.
I am programming in 1.6 version of the framework.
PS: The fact that I've search everywhere for the answer and have not been able to find it tells me that this must be so very simple or very much complicated.
View 3 Replies
View Related
Aug 30, 2010
I have a requirement to Capture the image without showing the Preview.. And i want to do it in the Background as a Service. Is it possible to do that?
View 2 Replies
View Related
May 21, 2010
Will Google allow Android applications to grab and process individual video frames of the currently selected channel in Google TV sets? I would be interested in that, and the process can be very similar to capturing preview images from a (second) camera.
View 3 Replies
View Related