Click here to Skip to main content
15,907,183 members
Home / Discussions / Java
   

Java

 
QuestionMessage Removed Pin
20-Nov-10 7:12
mr_plow9920-Nov-10 7:12 
AnswerRe: Help with essentially searching text Pin
Dr.Walt Fair, PE20-Nov-10 12:46
professionalDr.Walt Fair, PE20-Nov-10 12:46 
GeneralMessage Removed Pin
22-Nov-10 5:55
mr_plow9922-Nov-10 5:55 
GeneralRe: Help with essentially searching text Pin
Dr.Walt Fair, PE22-Nov-10 8:08
professionalDr.Walt Fair, PE22-Nov-10 8:08 
GeneralRe: Help with essentially searching text Pin
David Skelly23-Nov-10 1:53
David Skelly23-Nov-10 1:53 
GeneralMessage Removed Pin
23-Nov-10 9:01
mr_plow9923-Nov-10 9:01 
GeneralRe: Help with essentially searching text Pin
David Skelly23-Nov-10 21:51
David Skelly23-Nov-10 21:51 
QuestionJava Chronometer Pin
Smaini Nurbs17-Nov-10 16:58
Smaini Nurbs17-Nov-10 16:58 
I'm doing a Accelerometer on Android. I want the program to trigger the Chronometer if the values of the X and Y axis are 0. My codes for the Chronometer is correct. But I'm not sure if the code below is the correct way of calling the Chronometer class. Thanks for the help in advance.



package com.example.testsensors;

import android.content.Intent;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;

public class Decision extends ChronometerDemo1 {

	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
	}
        
	
	public void onSensorChanged(SensorEvent event) { 
               
        if (event.values[0] <= 0.3 && event.values[0] > 0.0) {
        	Intent i = new Intent(this,ChronometerDemo1.class);
            startActivity(i);
        }
        
        else if (event.values[1] <= 1.2 && event.values[1] > 0.0) {
        	Intent i = new Intent(this,ChronometerDemo1.class);
            startActivity(i);
        }
           
        else if (event.values[2] <= 10  && event.values[2] > 0.0) {
        	Intent i = new Intent(this,ChronometerDemo1.class);
            startActivity(i);
        }
                else{
                		//ChronometerDemo1.onCreate();
                	Intent i = new Intent(this,ChronometerDemo1.class);
                    startActivity(i);
                }
        }


	public static void onCreate() {
		// TODO Auto-generated method stub
		
	}
}

AnswerRe: Java Chronometer Pin
Richard MacCutchan18-Nov-10 1:40
mveRichard MacCutchan18-Nov-10 1:40 
GeneralRe: Java Chronometer Pin
Smaini Nurbs18-Nov-10 16:35
Smaini Nurbs18-Nov-10 16:35 
GeneralRe: Java Chronometer Pin
Nagy Vilmos18-Nov-10 21:47
professionalNagy Vilmos18-Nov-10 21:47 
GeneralRe: Java Chronometer Pin
David Skelly18-Nov-10 22:13
David Skelly18-Nov-10 22:13 
GeneralRe: Java Chronometer Pin
David Skelly18-Nov-10 22:16
David Skelly18-Nov-10 22:16 
GeneralRe: Java Chronometer Pin
Richard MacCutchan18-Nov-10 22:52
mveRichard MacCutchan18-Nov-10 22:52 
QuestionCall Class Pin
Smaini Nurbs13-Nov-10 0:58
Smaini Nurbs13-Nov-10 0:58 
AnswerRe: Call Class Pin
Smaini Nurbs13-Nov-10 1:02
Smaini Nurbs13-Nov-10 1:02 
GeneralRe: Call Class Pin
David Skelly16-Nov-10 22:27
David Skelly16-Nov-10 22:27 
GeneralRe: Call Class Pin
Smaini Nurbs17-Nov-10 16:55
Smaini Nurbs17-Nov-10 16:55 
GeneralRe: Call Class Pin
David Skelly17-Nov-10 22:15
David Skelly17-Nov-10 22:15 
GeneralRe: Call Class Pin
Smaini Nurbs18-Nov-10 16:35
Smaini Nurbs18-Nov-10 16:35 
AnswerRe: Call Class Pin
TorstenH.13-Nov-10 4:59
TorstenH.13-Nov-10 4:59 
GeneralRe: Call Class Pin
Smaini Nurbs13-Nov-10 18:27
Smaini Nurbs13-Nov-10 18:27 
GeneralRe: Call Class Pin
TorstenH.13-Nov-10 21:09
TorstenH.13-Nov-10 21:09 
GeneralRe: Call Class Pin
Smaini Nurbs13-Nov-10 22:36
Smaini Nurbs13-Nov-10 22:36 
AnswerRe: Call Class Pin
Richard MacCutchan13-Nov-10 5:58
mveRichard MacCutchan13-Nov-10 5:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.