We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0a819f commit 14c3348Copy full SHA for 14c3348
wallpapers/ex2_compass/ex2_compass.pde
@@ -52,12 +52,8 @@ void draw() {
52
53
public void onResume() {
54
super.onResume();
55
-
56
- // This works for regular apps
57
- //Context context = surface.getActivity();
58
59
- // This for fragments:
60
- context = (Context) surface.getComponent();
+
+ context = surface.getContext();
61
62
listener = new SensorListener();
63
manager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
0 commit comments