|
|
 |
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

August 12th, 2009, 08:46 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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();
}
}, 0, 10);
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,
|

August 12th, 2009, 10:04 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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(context, String.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,
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
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 03:42 PM |
|
 |