Wrox Programmer Forums
|
BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2009, 07:46 PM
Registered User
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default speedometer

Hi,

I am reading the chapter about work with sensors, and I tried to run the app Speedometer but seems like it is not working,

I tried to change the time of update of this part of code as well,

PHP Code:
 Timer updateTimer = new Timer("velocityUpdate");
      
updateTimer.scheduleAtFixedRate(new TimerTask() {
        public 
void run() {
          
updateGUI();
        }
      }, 
010); 
here is the thing: I am triying to use this example to know when my cellphone is falling down or , when I move my cellphone quickly with my hands,

any idea?

best,
 
Old August 12th, 2009, 09:04 PM
Registered User
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I am learning why is not working, my first idea is because mytextview is not been updating, so I check the code with a toast and:

PHP Code:
Context context getApplicationContext();
      
      
Toast toast Toast.makeText(contextString.valueOf(currentAcceleration), );
      
toast.show(); 
and is working, the first values are between 9.8-9.9 and I thought that was because is the gravity force, I think will be very interesting if you can explain a little bit more about:

calibration
and why the example is not working 100%, cuold be a configuration of the phone?

best,





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 Speedometer SensorSimulator JHandal BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 April 16th, 2009 02:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.