I have an android project that gets acceleration values using the accelerometer.
public void onSensorChanged(SensorEvent event){
float x,y;
x = event.values[0];
y = event.values[1];
}
I also have a regular java project that draws a point at a given location (x,y) using java swing.
I want that location to be some manipulation of the x, y acceleration values I get from the android project. Like, onSensorChanged should call a method in the regular java project that draws the dot and pass the x, y values. So ultimately, the swing code will track the movement of the phone. But that's not the important part. I just want to know how I would connect an android project to a regular project that uses swing. Probably didn't express my intention well, but if anybody gets what I'm trying to do, please help.