Do you need to use async with sensor values to be able to use them in another method?

I have this code but when button click event is triggered sensor data stops being up dated. I would like the rotation to be constantly displayed.
        public void OnSensorChanged (SensorEvent e)
            if (e != null)
                rotationEditText.Text = e.Values [2].ToString("0.0");
        public void button_OnClick (object sender, EventArgs eventArgs)
             Thread.Sleep(5000);

I have two tasks that I'm trying to accomplish,
Calibrate Button click event reads phone orientation, waits one second, reads phone orientation, waits one second and then reads the phones orientation for a third time. In this event it will only record the orientation if the readings are within a percentage
range. This is to ensure the phone is stationary and recorded orientation is very accurate.
Recording Button click event is a lap timing method where the accelerometer and orientation readings will be recorded with the lap times.
In both cases the sensor readings need to be accessible in another method.
I tried changing the public void OnSensorChanged(SensorEvent e) to async but then it through an error saying there was no OnSensorChanged event.

Similar Messages

  • Can you manually add data to Nike + or do you need to use the Nano?

    Can you manually add data to Nike + or do you need to use the Nano?
    What if you are on a trip and forgot your Ipod. It would be great to be able to add lost data. or even edit the Ipod data on the Nike + website

    Hi Hrbrmstr,
    That will be very cool if you can create an xml file
    that will allow us to add runs and edit runs on the
    Nike+ site! The trick may be getting past the server
    dragon which sends out a warning saying, "Your
    workout data could not be sent to nikeplus.com
    because the data could not be accepted by the server"
    when it does not like the data it is sent.
    For example, my runs that did not post had something
    in common: when I read these xml files with TextEdit,
    both have a line that says,
    "<stepCounts><walkBegin>0</walkBegin>". There's also
    a line that tracks steps run. It also said zero. Of
    course, these lines should NOT read zero, because I
    was not starting at zero steps! My guess is that this
    anomaly makes the Nike+ server either reject or
    delete these runs because the step count does not fit
    my other runs.
    Well, I'll leave this stuff to someone who knows more
    than I. Glad you're here.
    For jackt123, the longer is answer to your question
    is that certain things that are not doable now may be
    doable in the future. Stay tuned.
    I just got the dragon today. "Your workout data could not be sent to Nikeplus because iTunes received an unexpected response from the server. Please try again later." Did you ever find out why this happened to you? I went on nikeplus and it did in fact upload my latest run. Now my goals are blank on nikeplus.

  • Do you need to use an email as an apple ID?    We have a family email which is currently the apple ID so I can keep track of purchases but i have 2 iPhones and 2 itouches. Can all 4 devices have different apple ID under the same email address. Also for th

    Do you need to use an email as an apple ID?    We have a family email which is currently the apple ID so I can keep track of purchases but i have 2 iPhones and 2 itouches. Can all 4 devices have different apple ID under the same email address. Also I wanted to know because for the game center we wanted to keep track of each individual not just o e account.  DID I MAKE SENSE

    Figured it out. Thanks.

  • Do you need to use H.264 encoding?

    Good morning.
    I'm using VisualHub to convert/encode my movies for my AppleTV. Do you need to use the H.264 encoding option or is it just a personal preference?
    Thanks.
    Mac Mini   Mac OS X (10.4.4)   20" Apple Cinema Display, iBook G4, MacBook Pro

    Do you need to use the H.264 encoding option or is it just a personal preference?
    I can't speak on VisualHub specifically (though I hear great things about it) but, yes, I'd would say that it's personal preference.
    I'm sure you've read this elsewhere, but the benefit to h.264 is that it's a more efficient algorithm compared to MPEG-4. In non-tech speak, that means that it produces smaller files size at the (relatively) same quality. The major downside, of course, is that h.264 takes substantially longer to encode than MPEG-4.
    Depending on the your needs – how demanding are you about quality? - and constraints - do you have a lot of stuff to encode, but not enough time? - MPEG-4 should be fine.

  • I used a usb turntable to import old vinyl records into iTunes. Then with the cloud and iTunes match I put them on another Mac.  The songs come up in the music list but they are greyed out.  How do I get them recognized.

    I used a usb turntable to import old vinyl records into iTunes. Then with the cloud and iTunes match I put them on another Mac.  The songs come up in the music list but they are greyed out.  How do I get them recognized.  The symbol states the songs were downloaded from iCloud.  I would like to get them to play so that I can make a playlist, and burn a CD.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • I've heard of iPhones being cloud locked but you can still use them as a regular iPod touch, that's what my sister does at least. But what happens if an iPod is like that?

    I was looking at this iPod 5 on Ebay earlier and in the description it said iCloud locked. I've heard of iPhones being cloud locked but you can still use them as a regular iPod touch, that's what my sister does. But what does it mean when an iPod is cloud locked? Can I not do certain things? I would just like to know this in case I decide to buy. Thanks.

    iCloud: Find My iPhone Activation Lock in iOS 7

  • How to retrieve comments from one OfficeTask activity and use them in another OfficeTask activity for Multi level Approval sequential Workflow

    I'm designing a sequential site workflow using Visual Studio 2010 for Project Server 2010. In my case, I have following 6 stages in the workflow:
    1. InitialProposal Stage
    2. Approval Stage1 -- Needs approval from Approver Project Security Group Members1
    3. Rejection Stage
    4. Approval Stage2 -- Needs approval from Approver Project Security Group Members 2
    5. Execution Stage
    6. Completed Stage
    Requirement is workflow should move to Approval stage2 from Approval stage1  if approved by all members of Approver Project Security Group1and it should move to Rejection Stage even if a single member rejects it.
    Workflow should move from Approval Stage2 to Execution Stage if approved by all members of Approver Project Security Group2 and it should move back to Approval Stage1 on rejection by a single member of the group.
    I'm using inbuilt PSWApproval content type and OfficeTask activity for creating approval task for the group members at both stages.
    On task rejected in Approval stage2, task will be assigned again to Approval Stage1 and I want to show comments given by members of Approver Project Security Group2 to the members of Approver Project Security Group1 with this assigned task
    but I'm not able to retrieve comments from officeTask activity.
    My question is where exactly these comments are saved? how can we retrieve them and use them in another officetask activity? If this is not possible then what is the possible solution for meeting above mentioned business requirement?

    Hi Paul,
    Thanks for your suggestion.
    By comments field I'm assuming OfficeTask.Comments field. Problem is, this field is always null. I tried accessing this field in CheckExitCondition activity as well as in OnTaskCompleted but in both the cases, it was null only(I wrote comments while approving
    the task).
    I used a code activity within OnTaskCompleted activity and following code for accessing Comments and Description fields:
    public string officeComments;
            public string officeDescription;
            private void TaskCOmplete(object sender, EventArgs e)
                CodeActivity Sender = (CodeActivity)sender;
                Microsoft.Office.Workflow.Actions.OfficeTask ofctask1 = ((CompositeActivity)Sender.Parent).Parent as Microsoft.Office.Workflow.Actions.OfficeTask;
                officeComments = ofctask1.Comments;
                officeDescription = ofctask1.Description;          
    Please tell me if I'm doing anything wrong here, I'm very new to Workflows. Also, do I need to set any specific property of officeTask for retriving comments?
    Thank you

  • Do you need to use Actionscript 3 code in Flash player 9 and above?

    Can anyone tell me if I need to use Actionscript 3 code instead of Actionscript 2 code in the following situation:
    I am running a swf file which is contained in a browser window (all files are contained on a CD and I have a 'trust' file set up to let them play properly).  Up until now, I have been using the following Actionscript 2 code to close the browser window (the Actionscript 2 code is on an 'Exit' button within the swf):
    on (release) {
    getURL("javascript:window.close()");
    This Actionscript 2 code has always worked and still works in Flash player 8 and lower.  However, it does nothing when played using Flash player 9.  Can anyone tell me if Flash player 9 won't recognize Actionscript 2 code?  Is it essential to use ONLY Actionscript 3 code if you are using Flash player 9?
    I am having the same problem when I try to launch another html page containing a swf (popped up from the swf contained in the main html window).  I have the following code on the button to launch the popup html window.  It always worked, but suddenly no longer works with Flash player 9.  Here is the code I am using:
    on (release) {
                getURL("javascript:launchWin2('webpage2.html');");
    I have all the necessary background code to launch 'webpage2.html'.  It works everywhere except in Flash player 9.  Can anyone tell me if it is essential to use Actionscript 3 code ONLY on these buttons in Flash player 9?  I am pretty new to Actionscript 3, so any help with syntax would be appreciated. 
    Please note that I don't want to use the projector.
    Thanks!

    You can use both AS2 and AS3 based applications in both Flash 9 and 10.
    As for the issues you describe - perhaps Flash General Forum is a better bet:
    http://forums.adobe.com/community/flash/flash_general

  • So you need to use timeline for a simple slide show?

    Do you have to do anything with the timeline to run a simple
    looped slide show with no sound. What is a good rate (fps)? I am
    desperate. Why does it not advance to the next slide? How do you
    reset the program to its original defaults.
    Thanks

    ngreenhalgh wrote:
    > Do you have to do anything with the timeline to run a
    simple looped slide show
    > with no sound.
    Beyond adding your images and animating them...no. But not
    sure what you are referring to
    specifically when you ask what you have to do with the
    timeline - you certainly need the timeline to
    animate something over time. Flash will loop by default
    unless told to stop.
    What is a good rate (fps)?
    "good" is relative - depends on your needs - 1 frame rate may
    be good for some projects and very bad
    for others - depends on how heavy the animation is.
    I am desperate.
    Desperate for what exactly?
    Why does it not
    > advance to the next slide?
    Impossible to say without looking under the hood - "slide"?
    Are you using slides or the main
    timeline? We have no idea how your FLA is setup so we can't
    possibly troubleshoot it - provide some
    specific information or better yet the source file and we
    will take a look.
    How do you reset the program to its original
    > defaults.
    Not sure what you mean - default what? Panel layouts? Doc
    Properties? Why would this solve your
    problem(s)? The only way is to reinstall flash i believe -
    why do you need to do this?
    > Thanks
    >
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com

  • HELP NEEDED *Lsmw using bapi as import method*

    Hi,
        I am trying a n example implementing lsmw using bapi as inport method for the purchase order data. Here when i am trying to get the data i am getting an error "Ensure field sequence is correct for data for multiple source  structures". I have single text file which has both header and the line item data.
    IDENTIFIER VENDOR PURCH ORG     PURCH GRP                
    H                  100001           0001                  001               
    IDENTIFIER MATERIAL QTY PRICE MATGRP PLANT     DELDATE
    I                   A         50        1000               YAS1     20/10/2007
    Thank you,
    Madhu

    Hi madhu,
    check the step where you assign the source structure in the LSMW and check whether it is in accordance with your flat file field sequence.  I think that is cause for your error.
    Reward points if useful.
    Best Regards,
    Sekhar

  • Color box change with sensor value

    how can i use a color box to display a sensor value..? i tried but it's just dark blue to light blue..
    e.g if i have a distance sensor the colour box will change gradually from red to green(perhaps and yellow for the middle) for a value from 0 to 255.. 
    Thanks 
    Solved!
    Go to Solution.

    This one works too.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Color Box Example.vi ‏10 KB

  • Using variable from another method?

    Hi all, i have the code below and am getting error of:
    cannot find symbol
    symbol : variable myList
    location: class Driver
              myList.addFirst(nodeone);
    The areas noted are in bold, i want to seperate my code in the if statements into seperate methods which can be called, but when i do this i dont have access to the mylist variable. am i getting the right end of the stick? Hope someone can help. Thx
    import java.util.*;
    public class Driver
    public static void main(String args[])
    List myList = new List();
    System.out.println("COMMAND LIST");
    System.out.println("");
    System.out.println("addFirst - Inserts a node at the beginning of the list");
    System.out.println("addLast - Inserts a node at the end of the list");
    System.out.println("getFirst - Returns the first node in the list");
    System.out.println("getLast - Returns the last node in the list");
    System.out.println("");
         Scanner input = new Scanner(System.in);
         String command;
         System.out.print("Please enter a command: ");
         command = input.next();
         if (command.equals("addFirst"))
              inputAddFirst();
              else if (command.equals("addLast"))
                        String nodeName;
                        System.out.print("Enter name of Last Node: ");
                        nodeName = input.next();
                        Node nodelast = new Node(nodeName);
                        myList.addLast(nodelast);
                        System.out.println("Setting Last Node");
              public static void inputAddFirst()
              String nodeName;
              Scanner input = new Scanner(System.in);
              System.out.print("Enter name of First Node: ");
              nodeName = input.next();
              Node nodeone = new Node(nodeName);
              myList.addFirst(nodeone);
              System.out.println("Setting First Node");
    }

    You can pass myList to the method that uses it.
    Or, you can make inputAddFirst just return an object, and add it in main.
    Or you could make myList a field, rather than a local variable. If you do that however, you'd probably want the stuff in main to go into a new, non-static method. Also you shouldn't use fields for what are in essence temporary variables, so ask yourself whether myList really represents the ongoing state of whatever object it's in.

  • HT201250 Do you need to use a new external hard drive or an erased one to back up once you upgrade to OSX Lion?  My time capsule fails ever since I upgraded the new program to my old mac.

    I have not been able to back up in Time capsule since I upgraded my mac to MAC OSX Lion 10.7.5.
    Do I need a new external drive or an erased drive to get it to work with the lion software?

    Either new or an erased drive is fine, as long as it is formated Mac OS Extended (Journaled).
    By the way: I find that Carbon Copy Cloner is a much simpler and efficient "clone"(backup) solution, especially if you're using an external drive.
    http://www.bombich.com/

  • With an iPad do you need to cover it with an antivirus cover as I keep getting a message from Skype that I'm not covered

    With an iPad do I need to buy an anti virus to cover the iPad as I keep getting messages from Skype telling me I'm not covered?.

    Those skype messages are spam. iPads do not need anti-virus because, as of now, there is no known virus for the iPad. (and know that a 'virus' has a very specific definition....a program that spreads itself by moving from file to file within your device, 'contaminating' one program after another.....the 'sandbox' nature of the iPad keeps different programs/apps from talking to each other, thus a virus, by that defintion, cannot spread)
    That said the iPad is vulnerable to browser hijacks and redirects and forms of malware....but all those do require the user to do something to help them spread.
    That skype ad, are you using some sort of free app? Often 'free' apps come at the price of you getting ads like that. Also, if you're using safari and you're seeing some sort of popup ad for that skype anti-virus it wn't install on your iPad since the application thinks you're on a comptuer and it will install that junk on your computer but won't run on the iPad's operating system.
    Chances are that message from skype is either spam or phishing or some sort of malwere wanting you to tap 'yes' so it can try to install.

  • HT201359 Do you need to use a credit card to start iTunes and AppStore or can you just use a gift card?

    I just bought my iPod and i need to enter billing information to make a purchase from the iTunes Store. Do I have to enter credit card information or will it work with just a gift card?

    Hello, Rojelio16.
    Thank you for visiting Apple Support Communities.
    To create an Apple ID without a credit or debit card, there is a specific series of steps that have to be processed in order to allow the payment to be set as none on creation of the account.
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    http://support.apple.com/kb/HT2534
    If the specific steps have not been processed, a credit or debit card will be required to complete the setup the account.
    However, it can be removed and payment method changed to none as long as there is not an outstanding balance.  At this point an iTunes gift card can be used as form of payment. 
    iTunes Store: Changing account information
    http://support.apple.com/kb/ht1918
    Hope that helps,
    Jason H.

Maybe you are looking for

  • OIM 11g: Error while prepopulating process form

    I have a custom resource, with 4 child tables. When trying to provision the resource to a user when I click through to start populating data, I get the following error: Target Class = com.thortech.xl.util.adapters.tcUtilDateOperations <Mar 17, 2012 9

  • Adobe form javascript error

    hi experts, i am new to adobe interactive forms. i have created a simple form with some input fields which refer to abap webdynpro context and added a submit button from webdynpro activex menu. the click event is created in abap web dynpro. when i ex

  • ISE 1.3 and multiple authorization conditions

    I am building an ISE 1.3 box and I want to know if the following is doable I have an AD forrest that has several user groups configured  corporate BYOD demo What I want to do, is use these groups to assign wireless users to the correct VLAN based on

  • Can anyone explain nonpredefine exception with real world example

    Can anyone explain nonpredefine exception with real world example

  • Document on Taskflow ....

    Dear Friends, Does Anybody Have the Document for Taskflow Nodes & Taskflow Defination, If Yes pls send it cross to this id swpana1981@gmail(.)com. Pls help me on this ... with regards Swpana