Android :: GLSurfaceView And Key Presses

Nov 30, 2009

Following the samples and examples, I've successfully been able to load a model on screen and rotate it with the DPAD keys and overriding the onKeyDown method of the GLSurfaceView. Trying to use a letter though, causes a small box to appear at the bottom accepting the text that is being typed. What I'm not entirely clear on, is since I don't have a listener defined in the main Activity, why those key letter key presses are being intercepted by some other inherent listener(?). I setup an OnKeyListener for the view to call my own method and that does work... but I'm wondering if there is perhaps a better way to handle it.

Android :: GLSurfaceView and Key Presses


Android :: Key Presses On Numeric Keypad?

Oct 21, 2010

I use the following code to listen for the key presses of 0 - 9 from the soft input keyboard on Android: The code works when i display the soft input keyboard in the following mode: http://i.imgur.com/Snasz.png: However it does **not** work when I display the soft input keyboard in the following mode: http://i.imgur.com/wf0Kt.png. Why is this?

View 6 Replies View Related

General :: How To Log Button Presses In Android

Nov 22, 2012

a hardware bug on my Samsung Galaxy S Plus.I'm writing this in the general forums since it doesnt seem to be a bug specific to the phone (no reports anywhere online) and the question itself is therefore not device specific.So i have a hardware home button on the phone which sometimes registers two clicks instead of one.On a 1sec press this would mean the following events:

- button down event
1sec pause
- button up event
- button down event
- button up event

So since this doesn't occur regularly and i want to somehow log presses of the home button and i dont know any way to do that in android.It doesn't need to run in the background but could be for example be opened specifically to test the button.

View 1 Replies View Related

Android :: How To Listen For System Wide Key Presses?

Jun 4, 2010

I am trying to add a listener to my service that listens for volume key presses. I would like to act on presses even if my service is not in focus. Any idea how to do this? I have looked over the API, as well as performed google searches.

View 4 Replies View Related

Android :: How To Set Up Button Presses With OnTouch Event?

Mar 27, 2010

I am relatively new to this still, and I have been developing a small app that would benefit greatly from a user being able to press 2 buttons at one time. What is the best method for achieving this? I dont think that an OnClickListener works like that, and I have seen examples for doing this with an OnTouch event. However, I do not know how to set up button presses with an OnTouch event.

View 3 Replies View Related

Android :: Suppressing Key Presses In Activity - Especially In Options Menu

Oct 8, 2009

I am writing an activity where the user is supposed to some editing and is critical. In this activity, I dont want pressing of Call key to make it go to Call Log so I handle onKeyDown call back and there if the key pressed is Call, I just return true. That solves my problem. But, if Options menu is opened and then I press Call button, I am not getting control in onKeyDown.

View 8 Replies View Related

Android : Google Voice: Automatically Presses 1 When Answering

Nov 4, 2010

Is there an app that will automatically press 1 when answering a call from someone who called the google voice number?I would prefer not to turn off 'call screening' because if my cellphone is off or doesn't have service (e.g. at work), any calls to my google voice number will go to voicemail instead of ringing my other phones.I recently learn off the Tasker app. Can this be configured to do this?

View 2 Replies View Related

Android :: Any Way To Intercept Power Button Presses When Running Service?

Feb 11, 2010

I am creating an Android service which constantly runs in the background. I'd like to be able to intercept calls to the power button to:
a) prevent the screen coming on

b) handle the power button press in a different manner.This is to enable the user to have a very simple interface to my application and prevent wasting battery powering up the screen when it is not required.

I will probably need an alternative mechanism to actually bring the screen back up (such as an extended key press or similar), but this only becomes relevant if what I'm after is possible.

View 2 Replies View Related

Android :: How Do I Return To Calling Activity If User Presses Back?

Aug 4, 2010

My MAIN activity is spawning a child activity that contains a ListView. While this ListView is being populated (through an AsyncTask), an indeterminate progress bar is shown.However, assuming that I am an impatient user and I press the BACK button, the progress bar is cancelled but I am left with a blank screen. I have to press BACK one more time to go back to the MAIN activity.I would like the app to go back directly to the MAIN activity by pressing BACK only once. Can somebody point me in the right direction? I am thinking I should call finish() somewhere but I don't know where to put it.

View 3 Replies View Related

Android :: Detect When User Presses On A Bitmap Which Is Inside Canvas?

Mar 15, 2010

Does anyone how I go about detecting when a user presses on a bitmap which is inside a canvas?

View 2 Replies View Related

Android :: Button Inside List Item - How To Process Long Presses?

Jul 20, 2010

I got a ListView item that contains a button inside. Currently the long press of a ListView item does not get processed. I thought that by setting the Button.setLongClickable(false) would allow the long press to be passed along to the ListView item and it's not happening.

View 5 Replies View Related

Android :: Application Crashes When User Presses Back Button / Where To Put Code?

Oct 6, 2010

First of all, maybe i went about this the wrong way in the first place. Situation is, i have a listview that when an item is clicked, it creates an intent and calls startActivityForResult() to another activity, to be able to edit the entries in the row. and that other activity after editing the required values, returns back to the calling activity, when the user clicks on a save button. The activity then uses the row Id to update the item.My problem now is that, if the user presses the BACK button instead, the application crashes. i have been looking around and see solutions like using Shared Preferences or onSavedInstanceState(), but i don't know where exactly i should be putting the code?

View 1 Replies View Related

Android : Make An Activity Destory When User Presses 'Back Button?

Sep 27, 2009

When I currently have my activity on the font of the screen, how can I make Android to 'destory' my activity when user clicks 'back' button? (i.e. onDestory of my Activity gets called)?

View 4 Replies View Related

Possible To Intercept Keyboard Key Presses?

Jul 28, 2011

Can a program sit in the background and intercept keypresses, convert the keypresses from one letter to another, and send it to whatever program you are working in as though the new letter is what you typed?As qwerty is the only layout choice for hardware keyboards and I don't have root on my tablet, I want to use this as a work around.

If I were to press "s" on my hardware usb keyboard. The program would intercept the "s" before it got to whatever textbox and convert it into the dvorak key equivalent of "o". That o would then be passed to the program as a normal keypress.

if I were to press asdfg on the qwerty aoeui would be sent instead.I thought it best to ask before I waste hours trying to learn how to write the program.

List of changes I would make in a pseudocode case statement format.
Select Case Key
#Comment - Number Row Key changes
- = change to [
= = change to ]
#Comment - Top Row Key changes
q = change to '
w = change to ,
[code]...

View 2 Replies View Related

Samsung Captivate :: Search Key Presses Itself

Nov 2, 2010

When I'm looking at a web page or app the search key will from time to time light up, give haptic feedback and initiate the the search function on its own. Anyone else have this issue?

View 5 Replies View Related

Samsung Galaxy S :: Phantom Context Key Presses

Oct 9, 2010

I purchased a Galaxy S through Bell in Canada a few days ago and it's been great, except for an issue that started just this morning. The phone keeps bringing up the context menu at random when I have not hit the key to do so. Sometimes I can use it for ten minutes without an issue, other times it will flip on/off repeatedly ever few seconds for a 15 second period or so. This is definitely not an issue of me pressing the key by mistake; I can lay the phone on the table and it will trigger the key on/off on its own.
I've tried:
- Cleaning the screen several times
- Rebooting
- Deleting pretty much every app I downloaded
- Total factory reset (from the boot menu)
After the factory reset the problem still exists, which leads me to believe it may be a hardware issue. I haven't seen any other posts regarding this issue, has anyone seen something like this before?

View 2 Replies View Related

Android :: Can't Find The GLSurfaceView?

Jun 12, 2009

i want to start programming in OpenGL on Android, but Eclipse can't find the GLSurfaceView. I'm using the 1.5 SDK. Do I have to set specific entries in the build path?

View 2 Replies View Related

Android :: Set EglSwapInterval When Using GLSurfaceView?

Sep 3, 2010

I am a lazybones using GLSurfaceView and loving it. But now that my code is running too darn fast (heh), I would like to slow it down via setting eglSwapInterval to 2 or something. Just to be nice to the battery. But, being a lazybones, I can find no way of doing this when using GLSurfaceView. (and hacking an early return from onDrawFrame() was very unsatisfying).

View 2 Replies View Related

Android :: GLSurfaceView On App Widget?

Mar 31, 2010

currently GLSurfaceView is not supported in app widget .can we make changes to framework to make it support? is there any limitation? if possible what framework change is required?

View 12 Replies View Related

Android :: Deadlock In GLSurfaceView

Jul 27, 2009

We are developing an application that uses a GLSurfaceView to display 3D objects. We regularly get the "Application Not Responding" dialog. Inspection of the dumped threads reveals something that looks suspiciously like a deadlock. I have added the three thread dumps involved below. The first thread is the main application event thread, and it is waiting on a join with a GLThread.

The second thread is a brand new GLThread that is waiting for a semaphore lock presumably so it knows it has exclusive access to the graphics hardware. The third thread is probably a previous GLThread (the one the main thread is waiting for to finish), that is waiting to be notified. The strange thing is that the main application thread has just done a "mDone=true; notify();" prior to calling "wait()", so the third thread should have been awaken? .........................

View 3 Replies View Related

Android : Put GLSurfaceview On Top On A SurfaceView

Dec 16, 2009

Look at this: http://nhenze.net/?p=172

They show that it is possible to put an GLSurfaceview on top on a SurfaceView. I hope it would be useful.

View 2 Replies View Related

Android :: Screen Flickering In GLSurfaceView

Mar 18, 2010

I'm using GLSurfaceView to create a simple OpenGL drawing application. Since the elements drawn in each frame must remain on screen in order to be composed into the whole drawing, I don't use gl.glClear(GL10.GL_COLOR_BUFFER_BIT) at the beginning of each frame. But not clearing the color buffer leads to substantial flickering. Is there any way to eliminate flickering while still not clearing the screen at the beginning of each frame?

View 7 Replies View Related

Android :: GLSurfaceView Transparent Bg Within ViewGroup

May 12, 2010

I am able to get a GLSurfaceView to have a transparent background with:

CODE:............

when I set the Activity's window background to transparent and the GLSurfaceView is the contentView of the Activity.

But, let's say my GLSurfaceview is parented by a ViewGroup and I want GLSurfaceView bg to be transparent to see the Viewgroup's background - I am not able to do so with the code above. Is this a limitation or am I missing something?

View 2 Replies View Related

Android :: Draw GLSurfaceView To A Bitmap

Nov 4, 2009

I have an application that uses GLSurfaceView to draw OpenGL ES graphics. This is all working (mostly) how I would expect.

Now, I would like to implement a screenshot feature. For normal views, it seems that the standard practice is to create a new Canvas with a Bitmap and then draw to that Canvas using View.onDraw(Canvas).

I've tried using SurfaceView.draw(Canvas) in a similar fashion, but it always results in a blank (black) image.

I've also tried using the drawing cache with the exact same result.

View 3 Replies View Related

Android :: Draw Text On GLSurfaceView

Apr 12, 2010

how to draw text on GLSurfaceView in Android?

View 5 Replies View Related

Android :: Use GLSurfaceView Similar To ViewGroup?

Jul 22, 2009

How can one use a GLSurfaceView similar to a ViewGroup, in the sense of adding Views(CustomViews) over it? Is there any means to make the GLSurfaceView be the canvas on which the view draws its contents?

View 5 Replies View Related

Android :: Transparent Sub-GLSurfaceView In Layout?

Mar 23, 2010

I'd like to display some 3d object on top of the normal 2d ui layout screen. The 2d ui screen has background image, and GLSurfaceView is child of the content layout. I tried the same technique of the Translucent GLSurfaceView in ApiDemos sample, but GLSurfaceView clears all and shows black background. Code...

View 2 Replies View Related

Android :: How To Overlay GLSurfaceView Over A MapView?

May 13, 2010

I want to create a simple Map based application in android ,where i can display my current position.Instead of overlaying a simple Image on the MapView to represent the position, i want to overlay the GLSurfaceView on the MapView. But i don't know how to achieve this. Is there any way to do that?. Please anybody knows the solution help me.

View 1 Replies View Related

Android :: How To Overlay GLSurfaceView Over A CameraPreview?

Sep 22, 2010

I am trying to merge two examples from the ApiDemos so one overlay over the other. 1. CameraPreview.java 2. TranslucentGLSurfaceViewActivity.java I guess GLSurfaceView is not really necessary, I saw demos that uses a GL layer as a Camera PreviewCallback, but since I am such a noob at OpenGL, I am kind of lost. Can someone points me toward the light (figuratively speaking)?

View 1 Replies View Related

Android :: GLSurfaceView With Drawable Background

Oct 2, 2010

I have a GLSurfaceView with a drawable as background, however only the background is visible when rendered without surfaceView.setZOrderOnTop(true)I need to avoid using setZOrderOnTop(true) because there are static TextView's being used on top of the GLSurfaceView. Any suggestions for getting this to work?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved