Search Results

Search found 571 results on 23 pages for 'hedley finger'.

Page 4/23 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Restricting joystick within a radius of center

    - by Phil
    I'm using Unity3d iOs and am using the example joysticks that came with one of the packages. It works fine but the area the joystick moves in is a rectangle which is unintuitive for my type of game. I can figure out how to see if the distance between the center and the current point is too far but I can't figure out how to constrain it to a certain distance without interrupting the finger tracking. Here's the relevant code: using UnityEngine; using System.Collections; public class Boundary { public Vector2 min = Vector2.zero; public Vector2 max = Vector2.zero; } public class Joystick : MonoBehaviour{ static private Joystick[] joysticks; // A static collection of all joysticks static private bool enumeratedJoysticks=false; static private float tapTimeDelta = 0.3f; // Time allowed between taps public bool touchPad; // Is this a TouchPad? public Rect touchZone; public Vector2 deadZone = Vector2.zero; // Control when position is output public bool normalize = false; // Normalize output after the dead-zone? public Vector2 position; // [-1, 1] in x,y public int tapCount; // Current tap count private int lastFingerId = -1; // Finger last used for this joystick private float tapTimeWindow; // How much time there is left for a tap to occur private Vector2 fingerDownPos; private float fingerDownTime; private float firstDeltaTime = 0.5f; private GUITexture gui; // Joystick graphic private Rect defaultRect; // Default position / extents of the joystick graphic private Boundary guiBoundary = new Boundary(); // Boundary for joystick graphic public Vector2 guiTouchOffset; // Offset to apply to touch input private Vector2 guiCenter; // Center of joystick private Vector3 tmpv3; private Rect tmprect; private Color tmpclr; public float allowedDistance; public enum JoystickType { movement, rotation } public JoystickType joystickType; public void Start() { // Cache this component at startup instead of looking up every frame gui = (GUITexture) GetComponent( typeof(GUITexture) ); // Store the default rect for the gui, so we can snap back to it defaultRect = gui.pixelInset; if ( touchPad ) { // If a texture has been assigned, then use the rect ferom the gui as our touchZone if ( gui.texture ) touchZone = gui.pixelInset; } else { // This is an offset for touch input to match with the top left // corner of the GUI guiTouchOffset.x = defaultRect.width * 0.5f; guiTouchOffset.y = defaultRect.height * 0.5f; // Cache the center of the GUI, since it doesn't change guiCenter.x = defaultRect.x + guiTouchOffset.x; guiCenter.y = defaultRect.y + guiTouchOffset.y; // Let's build the GUI boundary, so we can clamp joystick movement guiBoundary.min.x = defaultRect.x - guiTouchOffset.x; guiBoundary.max.x = defaultRect.x + guiTouchOffset.x; guiBoundary.min.y = defaultRect.y - guiTouchOffset.y; guiBoundary.max.y = defaultRect.y + guiTouchOffset.y; } } public void Disable() { gameObject.active = false; enumeratedJoysticks = false; } public void ResetJoystick() { if (joystickType != JoystickType.rotation) { //Don't do anything if turret mode // Release the finger control and set the joystick back to the default position gui.pixelInset = defaultRect; lastFingerId = -1; position = Vector2.zero; fingerDownPos = Vector2.zero; if ( touchPad ){ tmpclr = gui.color; tmpclr.a = 0.025f; gui.color = tmpclr; } } else { //gui.pixelInset = defaultRect; lastFingerId = -1; position = position; fingerDownPos = fingerDownPos; if ( touchPad ){ tmpclr = gui.color; tmpclr.a = 0.025f; gui.color = tmpclr; } } } public bool IsFingerDown() { return (lastFingerId != -1); } public void LatchedFinger( int fingerId ) { // If another joystick has latched this finger, then we must release it if ( lastFingerId == fingerId ) ResetJoystick(); } public void Update() { if ( !enumeratedJoysticks ) { // Collect all joysticks in the game, so we can relay finger latching messages joysticks = (Joystick[]) FindObjectsOfType( typeof(Joystick) ); enumeratedJoysticks = true; } //CHeck if distance is over the allowed amount //Get centerPosition //Get current position //Get distance //If over, don't allow int count = iPhoneInput.touchCount; // Adjust the tap time window while it still available if ( tapTimeWindow > 0 ) tapTimeWindow -= Time.deltaTime; else tapCount = 0; if ( count == 0 ) ResetJoystick(); else { for(int i = 0;i < count; i++) { iPhoneTouch touch = iPhoneInput.GetTouch(i); Vector2 guiTouchPos = touch.position - guiTouchOffset; bool shouldLatchFinger = false; if ( touchPad ) { if ( touchZone.Contains( touch.position ) ) shouldLatchFinger = true; } else if ( gui.HitTest( touch.position ) ) { shouldLatchFinger = true; } // Latch the finger if this is a new touch if ( shouldLatchFinger && ( lastFingerId == -1 || lastFingerId != touch.fingerId ) ) { if ( touchPad ) { tmpclr = gui.color; tmpclr.a = 0.15f; gui.color = tmpclr; lastFingerId = touch.fingerId; fingerDownPos = touch.position; fingerDownTime = Time.time; } lastFingerId = touch.fingerId; // Accumulate taps if it is within the time window if ( tapTimeWindow > 0 ) { tapCount++; print("tap" + tapCount.ToString()); } else { tapCount = 1; print("tap" + tapCount.ToString()); //Tell gameobject that player has tapped turret joystick if (joystickType == JoystickType.rotation) { //TODO: Call! } tapTimeWindow = tapTimeDelta; } // Tell other joysticks we've latched this finger foreach ( Joystick j in joysticks ) { if ( j != this ) j.LatchedFinger( touch.fingerId ); } } if ( lastFingerId == touch.fingerId ) { // Override the tap count with what the iPhone SDK reports if it is greater // This is a workaround, since the iPhone SDK does not currently track taps // for multiple touches if ( touch.tapCount > tapCount ) tapCount = touch.tapCount; if ( touchPad ) { // For a touchpad, let's just set the position directly based on distance from initial touchdown position.x = Mathf.Clamp( ( touch.position.x - fingerDownPos.x ) / ( touchZone.width / 2 ), -1, 1 ); position.y = Mathf.Clamp( ( touch.position.y - fingerDownPos.y ) / ( touchZone.height / 2 ), -1, 1 ); } else { // Change the location of the joystick graphic to match where the touch is tmprect = gui.pixelInset; tmprect.x = Mathf.Clamp( guiTouchPos.x, guiBoundary.min.x, guiBoundary.max.x ); tmprect.y = Mathf.Clamp( guiTouchPos.y, guiBoundary.min.y, guiBoundary.max.y ); //Check distance float distance = Vector2.Distance(new Vector2(defaultRect.x, defaultRect.y), new Vector2(tmprect.x, tmprect.y)); float angle = Vector2.Angle(new Vector2(defaultRect.x, defaultRect.y), new Vector2(tmprect.x, tmprect.y)); if (distance < allowedDistance) { //Ok gui.pixelInset = tmprect; } else { //This is where I don't know what to do... } } if ( touch.phase == iPhoneTouchPhase.Ended || touch.phase == iPhoneTouchPhase.Canceled ) ResetJoystick(); } } } if ( !touchPad ) { // Get a value between -1 and 1 based on the joystick graphic location position.x = ( gui.pixelInset.x + guiTouchOffset.x - guiCenter.x ) / guiTouchOffset.x; position.y = ( gui.pixelInset.y + guiTouchOffset.y - guiCenter.y ) / guiTouchOffset.y; } // Adjust for dead zone float absoluteX = Mathf.Abs( position.x ); float absoluteY = Mathf.Abs( position.y ); if ( absoluteX < deadZone.x ) { // Report the joystick as being at the center if it is within the dead zone position.x = 0; } else if ( normalize ) { // Rescale the output after taking the dead zone into account position.x = Mathf.Sign( position.x ) * ( absoluteX - deadZone.x ) / ( 1 - deadZone.x ); } if ( absoluteY < deadZone.y ) { // Report the joystick as being at the center if it is within the dead zone position.y = 0; } else if ( normalize ) { // Rescale the output after taking the dead zone into account position.y = Mathf.Sign( position.y ) * ( absoluteY - deadZone.y ) / ( 1 - deadZone.y ); } } } So the later portion of the code handles the updated position of the joystick thumb. This is where I'd like it to track the finger position in a direction it still is allowed to move (like if the finger is too far up and slightly to the +X I'd like to make sure the joystick is as close in X and Y as allowed within the radius) Thanks for reading!

    Read the article

  • How to make Master PDF Editor the default for .pdf files

    - by Hedley Finger
    I want to make Master PDF Editor (MPE) the default for opening PDF files. I right-clicked a PDF file, chose Properties Open With. MPE was not listed. I clicked Show Other Applications but MPE was still not on the list. I tried opening the PDF file with MPE, editing, and then closing it. MPE still did not show up. So how do I make MPE the default program, or at least appear on the Other Programs or Show Other Programs?

    Read the article

  • UIViewScrollviw UITableView subview scrolling. IOS

    - by user1484810
    I have a UIScrollview with a UITableview subview. The UIScrollview scrolls the UITableView horizontally. The UITable view naturally scrolls up and down. If a user places their finger on the UitableView, and moves (swipes) horizontally, The delegate method below is invoked (void)scrollViewDidScroll:(UIScrollView *)scrollView with scrollView isEqual theUIScrollView If the user lifts their finger and places it back down on the UITableView and moves in a vertical direction The delegate method below is invoked (void)scrollViewDidScroll:(UIScrollView *)scrollView with scrollView isEqual = theUITable If however the user places their finger and moves in a horizontally (void)scrollViewDidScroll:(UIScrollView *)scrollView with scrollView isEqual theUIScrollView If the user then moves the finger (without lifting it) in a vertical direction. delegate method scrollViewDidScroll is not invoked at all. (The reverse is true too.) I note that the "Pulse News" app seems to behave in the above manner.. Ultimately I want to figure out how to get the UITableView and UIScrollview moving in a "unidirectional" fashion, with one finger kept on the screen. Thanks...

    Read the article

  • Click and Drag from Clickpad stops working after a while 12.04

    - by Jason O'Neil
    I've got a Samsung Notebook (NP-QX412-S01AU) with a touchpad / clickpad. I'm running 12.04 Precise. When I first log into my computer, the touchpad behaves exactly as expected and desired. The longer I stay logged in, it slowly degrades. I'll try describe it. There are 3 ways of "dragging" on this clickpad: (Physical) click and hold with one finger, and drag around while still holding it down. All with one finger. (Physical) Click and hold with one finger, then with another finger drag around to move cursor. Double tap (not a physical click) and on the second tap, hold and drag. I most naturally use option 1, but here's how it works: When I first turn on, options 1, 2 and 3 all work. After a while, only options 2 and 3 work. Later still, only option 3 works. Restarting X causes all 3 to work again. I've compared the output of "synclient" in each of the states, and there was no difference. Anybody know what to look at? Or at the very least, a command I can run to "restart" the mouse driver without restarting X?

    Read the article

  • Is it possible to get dragging work on a Macbook multi-touch touch pad

    - by lhahne
    I have a Macbook 5,1. That is to say that it is the only 13 inch aluminium Macbook as the later revisions were renamed Macbook Pro. Two-finger scrolling seems to work fine but dragging doesn't work. In OsX this works so that you point an object, click and keep your finger pressed on the touch pad while slide another finger to move the cursor. This causes weird and undefined behavior in Ubuntu as it seems the driver doesn't recognize this as dragging. Any ideas?

    Read the article

  • help with synclient configuration on an ASUS touchpad

    - by yohbs
    I have recently installed Ubuntu 12.04 on my brand new ASUS K55V. The touchpad behaves weird - two finger tap is interpreted as right-click, click and drag is not working (a double click is needed) and so on. Two finger scrolling (horizontal & vertical) works great. I want the touch pad to behave the "normal" way (that is - like in my old laptop...). I read the synclient documentation and many of the questions posted here, and I can even make some stuff work. Unfortunately, I couldn't figure out how to make these work: Click and drag (that is - physically clicking the button and dragging a finger) Clicking in the right side of the button interpreted as right-click Clicking button with two fingers interpreted as middle-click. specs: The touchpad is equipped with a physical button that clicks. Here's the output of xinput list-props "ETPS/2 Elantech Touchpad" | grep Capabilities: Synaptics Capabilities (294): 1, 0, 1, 1, 1, 1, 1 Any help will be much appreciated.

    Read the article

  • Sluggish/unresponsive trackpad on pre-unibody MacBook Pro

    - by Art
    I am running Ubuntu Natty Narwhal on pre-unibody MacBook Pro (2007 I believe). There seems to be a problem with trackpad - it barely works, in order to move cursor you have to move your finger a lot, and it terminates the 'gestures' abruptly - say you are moving the cursor with your finger and out of the blue it just stops, although the finger is still in contact with the surface of the trackpad. Those issues seem to dissapear as soon as I boot Mac OS X, so I suspect it is something Ubuntu-specific. Also, if I try to move the cursor with not just fingertip but increase the contact area, it seems to work just fine, although it is hardly convenient.

    Read the article

  • Is it possible to get dragging working on a Macbook multi-touch touch pad?

    - by lhahne
    I have a Macbook 5,1. That is to say that it is the only 13 inch aluminium Macbook as the later revisions were renamed Macbook Pro. Two-finger scrolling seems to work fine but dragging doesn't work. In OsX this works so that you point an object, click and keep your finger pressed on the touch pad while slide another finger to move the cursor. This causes weird and undefined behavior in Ubuntu as it seems the driver doesn't recognize this as dragging. Any ideas?

    Read the article

  • HP Probook touchpad

    - by ScienceSE
    I wrote about this problem some weeks ago, but now the question is: "Why is touchpad works not so good as in windows". I tried some "experiments": When I use windows and if I accidentally touched touchpad - cursor isn't moving, also no clicks occurring. So in windows working with touchpad is quite normal, but in Ubuntu ?f I accidentally touch the touchpad even with my wrist - cursor is moving etc. In Windows, the cursor moves only when I touch it with finger. And... If, for example, I hold one finger on touchpad and simultaneously move the second finger on the touchpad - the cursor doesn't move, however in ubuntu he does. He's "super sensetive" in ubuntu or what? Also I tried to apply the option in "Mouse and touchpad", which called "Disable touchpad when typing", but nevertheless he isn't disabling when i'm typing... Note: this option is circled in red frame, i dont know is it a good "sign" ) What can I do to fix the problem?

    Read the article

  • Retrieve the coordinates of the *occluding* (closest/drawn) pixels during 3D overlap, using OpenGL?

    - by Big Rich
    Hi, Sorry if the question is not worded well, I'm a new to both 3D and OpenGL. How could I go about obtaining the 3D coordinates of the occluding object, at the point where occlusion is happening (i.e. the 'intersection' of the object in front/closest to the screen)? Just to offer a [very] rudimentary, visual, example, if you were to form an index-finger cross, with your right hand closest to your face, I'd like to know the coordinates of the part of your right finger which obscures the other finger (obviously back within the OpenGL context - no jokers ;-) ). If there is a way to find out both about the occluder (hider) and the occluded (hidden) objects in OpenGL, then that would be of great use, also. Cheers Rich

    Read the article

  • How do I make 3finger multitouch work on Samsung 530?

    - by RiaD
    I have Samsung 530U4C. How can I configure 3-finger gestures to work? Choosing next photo using 3 finger "scrool" worked in Windows 7. If I use synclient TapButton3=2 I may use it as medium mouse button, but there's problem: it gets cancelled after reboot, and as I read over the Internet, sometime else. Moreover, it would be great to see all gestures my laptop support and configure them all as I need. I find some info about touchegg, but I didn't manage to understand what it exactly is and even run it. Two-finger gestures works fine(configured using System setting menu)

    Read the article

  • Recommend a free/cheap CRM system [closed]

    - by Dan Hedley
    I am part of a 4 person volunteer team who manage a small housing development in London. We need a low-cost/no-cost contact management and issue tracking system. Specifically, it needs to be: -Web-based, or easily shared between 4 people working out of their homes -Easy to backup and restore -Decently secure Does anyone have any recommendations? I am reasonably technically literate, so a PHP-based solution running on a cheap hosting package would definitely be a viable option. Many thanks.

    Read the article

  • UIButtons creating a native-like keyboard behavior.

    - by camilo
    Greets. A somehow detailed explanation on my problem, and what I have already done, and what I cannot do. I want to create a behavior resembling the one in the iPhone's keyboard. Basically, I want a view to appear when the user taps a button and WHILE the user taps that button. This, I accomplished. When the user lets go of the button WHILE his finger is on that button's area, I want to trigger an action "doing stuff". This, I was also able to do. Since all the buttons are near (like in the keyboard) and I don't want the user to select other button than the one he pressed, I reduced the hit area for the button using the -(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent )event function. When the user presses the button, not lifting its finger, and dragging outside the button area, I want another action to trigger. This is the first problem... This function only triggers when the user's finger is far from the buttons' area, and this time the pointInside function is not being my friend. How can I detect the user finger "left" the button area the moment it exits its bounds? This, in case you didn't realize... was problem 1. The second problem is related with the drag enter. Again, I need to limit the area like in the drag exit. But I suppose that when I solve one of these, the other is the same. The problem is that in order to have a behavior like in the keyboard, I may need to detect the user started the touch in another button, never lifted his finger, and changed to another button. I can detect drag enter and drag exit IN THIS ORDER while on the same button. I cannot detect drag enter when the user first touched anywhere else other than the button where I want to detect the drag enter event. Basically what I need is to detect touch on any button (and not anywhere else in the view), and while the user is changing buttons without lifting the finger, I want to detect the new button being touched. This gigantic paragraph was problem #2. Any help, as you might guess, is highly appreciated. Best Regards. Thanks a lot!

    Read the article

  • How to track the touch vector?

    - by mystify
    I need to calculate the direction of dragging a touch, to determine if the user is dragging up the screen, or down the screen. Actually pretty simple, right? But: 1) Finger goes down, you get -touchesBegan:withEvent: called 2) Must wait until finger moves, and -touchesMoved:withEvent: gets called 3) Problem: At this point it's dangerous to tell if the user did drag up or down. My thoughts: Check the time and accumulate calculates vectors until it's secure to tell the direction of touch. Easy? No. Think about it: What if the user holds the finger down for 5 minutes on the same spot, but THEN decides to move up or down? BANG! Your code would fail, because it tried to determine the direction of touch when the finger didn't move really. Problem 2: When the finger goes down and stays at the same spot for a few seconds because the user is a bit in the wind and thinks about what to do now, you'll get a lot of -touchesMoved:withEvent: calls very likely, but with very minor changes in touch location. So my next thought: Do the accumulation in -touchesMoved:withEvent:, but only if a certain threshold of movement has been exceeded. I bet you have some better concepts in place?

    Read the article

  • Deploying InfoPath forms &ndash; idiosyncrasies

    - by PointsToShare
    Well, I have written a sophisticated PowerShell script to expedite the deployment of InfoPath forms - .XSN file.  Along the way by way of trial and error (mostly error and error), I discovered a few little things. Here they are. •    Regardless of how the install command is run – PowerShell or the GUI in Central Admin – SharePoint enwraps the XSN inside a solution – WSP, then installs and deploys the solution. •    The solution is named by concatenating “form-“ with the first 16 characters (or less if the file name is shorter than 16) of the file name and the required WSP at the end. So if the form name was MyInfopathForm.xsn the solution name will be form-MyInfopathForm.wsp, but for WithdrawalOfRequestsForRefund.xsn it will be named form-WithdrawalOfRequ.wsp •    It only gets worse! Had there already been a solution file with the same name, Microsoft appends a three digit number to the name, like MyInfopathForm-123.wsp. Remember a digit is a finger, I suspect a middle finger, so when you deploy the same form – many versions of it, or as it was in my case – testing a script time and again, you’ll end up with many such digit (middle finger) appended solutions, all un-deployed except the last one. This is not a bug. It’s a feature!   Well, there are ways around it. When by hand, remove the solution from the solution store before deploying the form again. In the script I do the same thing. And finally - an important caveat; Make sure that all your form names are unique in the first 16 characters. If you also have a form with the name forWithdrawalOfRequestForRelief.xsn, you’re in trouble! That’s all folks!

    Read the article

  • How can I make this arcade-highscore game more fun/interesting?

    - by j-a
    I'm having difficulties getting the fun factor into this iPhone game, and I am looking for some ideas or advice. I was asked to generalize the question a bit. What are some techniques for arcade highscore games that can be applied to this game in order to: Make each second of the game fun and challenging, from the first second to the end of the game. Regardless of skill level. Make the player want to try again and again to beat the high score. Briefly about the game: you aim using your finger and pull the bow chord and release by lifting your finger. That part feels quite nice how the bow interacts with the finger. The game idea: hearts fall down and you get 1 pt for each heart you shoot. You start with a few arrows and every now and then a bag of arrow comes down which - if you hit it, you get more arrows. Once your out of arrows the game is over. So it is all about beating your previous high score or your friends high scores. Unfortunately I don't find it that fun. Thankful for any ideas/suggestions/thoughts on how to make it more fun/interesting.

    Read the article

  • problems with my touchpad on my netbook

    - by user23421
    ive been having trouble with my touchpad its a synaptic pad. my problem is whenever i drag my finger across i a lot of times get this grey circle and i cant move anymore i have to take my finger off and start again its very annoying and the icon for the touchpad thats by the clock gets like a curved arrow in it and if i move my finger a little bit while this grey circle appears the arrow rotates in a circle its very weird! i have a Asus 1101HAB netbook and ive tried to update the driver when the asus updates appear and when i do it and restart the computer, then a couple days later maybe it pops up again saying i have an update and its for the touchpad and its the same version... not sure if its a bigger problem its only a week old that ive had this computer. If someone could help it would be much appreciated.

    Read the article

  • iPad Safari's mapping of mouse events to touch events in image-maps

    - by Tim
    My website makes extensive use of image-maps. The images are of pages from a medieval manuscript. The mouseOver event of the AREA tags has a tooltip attached to it, which displays a modern typographic transcription of the ancient script for the line the mouse is hovering over. I just checked my website out on the iPad at the Apple store. The iPad is many respects a joy to use, however, I am wondering about Apple's mapping of the mouseEvents to the finger-touch events. Apple probably had a good reason for doing things as they did, but their choices seem counterintuitive an overly complicated to me. Specifically, the iPad Safari browser clearly was responding to both fingerDown and fingerTap, and in different ways. When I tapped an area of the image-map, the tooltip wired to the mouse-over event pf the AREA tag was displayed, and remained visible until I tapped somewhere else. When I held my finger down on an area of the image-map, the area changed color. So if iPad Safari detects a mouseOver eventhandler, it executes the mouseOver code and apparently prevents the "click" event from propagating, so that if you also have something wired to the click event, it doesn't work? Is that right? But more importantly, why isn't fingerDown the iPad-Safari counterpart for mouseOver? FingerDown seems a more likely candidate than Tap when mapping the mousePOver event. I would have expected things to be mapped in this way: MouseClick : FingerTap (i.e. finger down and then immediately up) MouseOver : FingerDown (finger down and stays on the spot) If Apple had treated fingerDown as the counterpart to mouseOver, then the tooltip could be displayed upon FingerDown and made invisible again on fingerUp, which would be the counterpart to mouseOut. Perhaps someone could enlighten me about the thinking process that led Apple to these particular mouse-to-touch event-mappings? Thanks

    Read the article

  • Adobe AIR: touch screen doesn't trigger mouse down event correctly

    - by Saariko
    i have designed a gaming kiosk app in as3 i am using it on a Sony vaio l pc (like hp's touchsmarts) in windows 7 the app doesn't need any multi-touch gestures (only single touch clicks and drags) so i am using mouse events everything is fine (including mouse click and move events) except that a single touch to the screen (with no move) doesn't fire a mouse down. it is fired only after a small move of the finger outside the app, on my desktop, i see that the small windows 7 cursor jumps immediately to where a finger is placed, meaning this issue isn't a hardware or a windows problem but rather how internally the flash app receives "translated" touch-to-mouse events from the os. for example, in a windows Solitaire game, a simple touch to the screen immediately highlights the touched card. in my app, a button will change to the down state only if i touch it and also move my finger slightly (click events - down and up - are triggered fine) shouldn't the MOUSE_DOWN event trigger exactly like how a TOUCH_BEGIN would in the new touchevent class? any ideas?

    Read the article

  • Can I detect if higher subview has been touched?

    - by Kevin Beimers
    I've got a big UIView that responds to touches, and it's covered with lots of little UIViews that respond differently to touches. Is it possible to touch anywhere on screen and slide around, and have each view know if it's being touched? For example, I put my finger down on the upper left and slide toward the lower right. The touchesBegan/Moved is collected by the baseView. As I pass over itemView1, itemView2, and itemView3, control passes to them. If I lift my finger while over itemView2, it performs itemView2's touchesEnded method. If I lift my finger over none of the items, it performs baseView's touchesEnded. At the moment, if I touch down on baseView, touchEnded is always baseView and the higher itemViews are ignored. Any ideas?

    Read the article

  • Querying current number of touches on screen without using events on iPhone

    - by nikhil
    I have an application that starts playing a sound when user touches the uiview and changing to different tones as the user slides the finger on the screen. The sound stops when the user lifts the finger. I am using the touchesBegan, Moved and Ended Events for this. My problem is touches Ended (and/or cancelled) is sometimes not fired properly and the sound keeps playing even after the finger is lifted from screen. So as a workaround I would like to implement a timer that would check for the number of touches on the screen and if it is zero it will check and stop the audioplayer if playing. I have been searching for some code that could get me the number of touches like UITouch *touches=[self getAllTouchesonScreen]; or something :)

    Read the article

  • How to draw a transparent stroke (or anyway clear part of an image) on the iPhone

    - by devguy
    I have a small app that allows the user to draw on the screen with the finger. Yes, nothing original, but it's part of something larger :) I have a UIImageView where the user draws, by creating a CGContextRef and the various CG draw functions. I primarily draw strokes/lines with the function CGContextAddLineToPoint Now the problem is this: the user can draw lines of various colors. I want to give him the ability to use a "rubber" tool to delete some part of the image drawn so far, with the finger. I initially did this by using a white color for the stroke (set with the CGContextSetRGBStrokeColor function) but it did't work out...because I discovered later that the UIImage on the UIImageView was actually with transparent background, not white...so I would end up with a transparent image with white lines on it! Is there anyway to set a "transparent" stroke color...or is there any other way to clear the content of the CGContextRef under the user's finger, when he moves it? Thanks

    Read the article

  • Android animation doesn't work, probably some kind of screen redraw problem.

    - by BenIOs
    I have created a custom component in my program by extending a ViewGroup. This component listens to touch events and are supposed to start animations when the user has move their finger past some certain points. I'm able to start animations while the user is touching the screen. But I'm not able to start animations if the user doesn't move their finger. It's probably that the phone thinks it doesn't have to update the screen if the user isn't moving their finger. I added some logs and according to them the animation starts and ends but it doesn't draw on the screen. I have the same problems when starting an animation with a timer. I use AlphaAnimations and TranslateAnimations on ImageViews. I have tried to use invalidate() both on the component and the ImageView but it doesn't help. Anyone who has an idea how to solve this?

    Read the article

  • PHP or JS to connect with fingerprint scanner save to database

    - by narong
    I have a project to set profile user and save all data to database include fingerprint also. i don't what i should start, I have USB finger scanner already to test. What i think: i should have a input box to read data from USB finger scanner than i should create a function to upload it database. but with this thinking i meet problem: i don't know data that get from USB finger scanner is image or data? if image, how i can read it to input box to save to database ? Anyone have any idea, please share me to resolve it. I am looking to see your helping soon! thanks

    Read the article

  • Using the OAM Mobile & Social SDK to secure native mobile apps - Part 2 : OAM Mobile & Social Server configuration

    - by kanishkmahajan
    Objective  In the second part of this blog post I'll now cover configuration of OAM to secure our sample native apps developed using the iOS SDK. First, here are some key server side concepts: Application Profiles: An application profile is a logical representation of your application within OAM server. It could be a web (html/javascript) or native (iOS or Android) application. Applications may have different requirements for AuthN/AuthZ, and therefore each application that interacts with OAM Mobile & Social REST services must be uniquely defined. Service Providers: Service providers represent the back end services that are accessed by applications. With OAM Mobile & Social these services are in the areas of authentication, authorization and user profile access. A Service Provider then defines a type or class of service for authentication, authorization or user profiles. For example, the JWTAuthentication provider performs authentication and returns JWT (JSON Web Tokens) to the application. In contrast, the OAMAuthentication also provides authentication but uses OAM SSO tokens Service Profiles:  A Service Profile is a logical envelope that defines a service endpoint URL for a service provider for the OAM Mobile & Social Service. You can create multiple service profiles for a service provider to define token capabilities and service endpoints. Each service provider instance requires atleast one corresponding service profile.The  OAM Mobile & Social Service includes a pre-configured service profile for each pre-configured service provider. Service Domains: Service domains bind together application profiles and service profiles with an optional security handler. So now let's configure the OAM server. Additional details are in the OAM Documentation and this post simply provides an outline of configuration tasks required to configure OAM for securing native apps.  Configuration  Create The Application Profile Log on to the Oracle Access Management console and from System Configuration -> Mobile and Social -> Mobile Services, select "Create" under Application Profiles. You would do this  step twice - once for each of the native apps - AvitekInventory and AvitekScheduler. Enter the parameters for the new Application profile: Name:  The application name. In this example we use 'InventoryApp' for the AvitekInventory app and 'SchedulerApp' for the AvitekScheduler app. The application name configured here must match the application name in the settings for the deployed iOS application. BaseSecret: Enter a password here. This does not need to match any existing password. It is used as an encryption key between the client and the OAM server.  Mobile Configuration: Enable this checkbox for any mobile applications. This enables the SDK to collect and send Mobile specific attributes to the OAM server.  Webview: Controls the type of browser that the iOS application will use. The embedded browser (default) will render the browser within the application. External will use the system standalone browser. External can sometimes be preferable for debugging URLScheme: The URL scheme associated with the iOS apps that is also used as a custom URL scheme to register O/S handlers that will take control when OAM transfers control to device. For the AvitekInventory and the AvitekScheduler apps I used osa:// and client:// respectively. You set this scheme in Xcode while developing your iOS Apps under Info->URL Types.  Bundle Identifier : The fully qualified name of your iOS application. You typically set this when you create a new Xcode project or under General->Identity in Xcode. For the AvitekInventory and AvitekScheduler apps these were com.us.oracle.AvitekInventory and com.us.oracle.AvitekScheduler respectively.  Create The Service Domain Select create under Service domains. Create a name for your domain (AvitekDomain is what I've used). The name configured must match the service domain set in the iOS application settings. Under "Application Profile Selection" click the browse button. Choose the application profiles that you created in the previous step one by one. Set the InventoryApp as the SSO agent (with an automatic priority of 1) and the SchedulerApp as the SSO client. This associates these applications with this service domain and configures them in a 'circle of trust'.  Advance to the next page of the wizard to configure the services for this domain. For this example we will use the following services:  Authentication:   This will use the JWT (JSON Web Token) format authentication provider. The iOS application upon successful authentication will receive a signed JWT token from OAM Mobile & Social service. This token will be used in subsequent calls to OAM. Use 'MobileOAMAuthentication' here. Authorization:  The authorization provider. The SDK makes calls to this provider endpoint to obtain authorization decisions on resource requests. Use 'OAMAuthorization' here. User Profile Service:  This is the service that provides user profile services (attribute lookup, attribute modification). It can be any directory configured as a data source in OAM.  And that's it! We're done configuring our native apps. In the next section, let's look at some additional features that were mentioned in the earlier post that are automated by the SDK for the app developer i.e. these are areas that require no additional coding by the app developer when developing with the SDK as they only require server side configuration: Additional Configuration  Offline Authentication Select this option in the service domain configuration to allow users to log in and authenticate to the application locally. Clear the box to block users from authenticating locally. Strong Authentication By simply selecting the OAAMSecurityHandlerPlugin while configuring mobile related Service Domains, the OAM Mobile&Social service allows sophisticated device and client application registration logic as well as the advanced risk and fraud analysis logic found in OAAM to be applied to mobile authentication. Let's look at some scenarios where the OAAMSecurityHandlerPlugin gets used. First, when we configure OAM and OAAM to integrate together using the TAP scheme, then that integration kicks off by selecting the OAAMSecurityHandlerPlugin in the mobile service domain. This is how the mobile device is now prompted for KBA,OTP etc depending on the TAP scheme integration and the OAM users registered in the OAAM database. Second, when we configured the service domain, there were claim attributes there that are already pre-configured in OAM Mobile&Social service and we simply accepted the default values- these are the set of attributes that will be fetched from the device and passed to the server during registration/authentication as device profile attributes. When a mobile application requests a token through the Mobile Client SDK, the SDK logic will send the Device Profile attributes as a part of an HTTP request. This set of Device Profile attributes enhances security by creating an audit trail for devices that assists device identification. When the OAAM Security Plug-in is used, a particular combination of Device Profile attribute values is treated as a device finger print, known as the Digital Finger Print in the OAAM Administration Console. Each finger print is assigned a unique fingerprint number. Each OAAM session is associated with a finger print and the finger print makes it possible to log (and audit) the devices that are performing authentication and token acquisition. Finally, if the jail broken option is selected while configuring an application profile, the SDK detects a device is jail broken based on configured policy and if the OAAM handler is configured the plug-in can allow or block access to client device depending on the OAAM policy as well as detect blacklisted, lost or stolen devices and send a wipeout command that deletes all the mobile &social relevant data and blocks the device from future access. 1024x768 Social Logins Finally, let's complete this post by adding configuration to configure social logins for mobile applications. Although the Avitek sample apps do not demonstrate social logins this would be an ideal exercise for you based on the sample code provided in the earlier post. I'll cover the server side configuration here (with Facebook as an example) and you can retrofit the code to accommodate social logins by following the steps outlined in "Invoking Authentication Services" and add code in LoginViewController and maybe create a new delegate - AvitekRPDelegate based on the description in the previous post. So, here all you will need to do is configure an application profile for social login, configure a new service domain that uses the social login application profile, register the app on Facebook and finally configure the Facebook OAuth provider in OAM with those settings. Navigate to Mobile and Social, click on "Internet Identity Services" and create a new application profile. Here are the relevant parameters for the new application profile (-also we're not registering the social user in OAM with this configuration below, however that is a key feature as well): Name:  The application name. This must match the name of the of mobile application profile created for your application under Mobile Services. We used InventoryApp for this example. SharedSecret: Enter a password here. This does not need to match any existing password. It is used as an encryption key between the client and the OAM Mobile and Social service.  Mobile Application Return URL: After the Relying Party (social) login, the OAM Mobile & Social service will redirect to the iOS application using this URI. This is defined under Info->URL type and we used 'osa', so we define this here as 'osa://' Login Type: Choose to allow only internet identity authentication for this exercise. Authentication Service Endpoint : Make sure that /internetidentityauthentication is selected. Login to http://developers.facebook.com using your Facebook account and click on Apps and register the app as InventoryApp. Note that the consumer key and API secret gets generated automatically by the Facebook OAuth server. Navigate back to OAM and under Mobile and Social, click on "Internet Identity Services" and edit the Facebook OAuth Provider. Add the consumer key and API secret from the Facebook developers site to the Facebook OAuth Provider: Navigate to Mobile Services. Click on New to create a new service domain. In this example we call the domain "AvitekDomainRP". The type should be 'Mobile Application' and the application credential type 'User Token'. Add the application "InventoryApp" to the domain. Advance the next page of the wizard. Select the  default service profiles but ensure that the Authentication Service is set to 'InternetIdentityAuthentication'. Finish the creation of the service domain.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >