Is it possible to access the phone's sensors and used them in an OpMode? How can we do that?
We are trying to create a class that reads the Phone's Gyro and use this class in an opMode. As far as we understand, we need to use the getSystemService method, however, it is defined only for activity classes. We found out that this method can be called in a non-activity class, if the context of the activity is passed to that class in its constructor. How do we do that?
We are trying to create a class that reads the Phone's Gyro and use this class in an opMode. As far as we understand, we need to use the getSystemService method, however, it is defined only for activity classes. We found out that this method can be called in a non-activity class, if the context of the activity is passed to that class in its constructor. How do we do that?
Comment