All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sim.android.app.Activity Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
package sim.android.app;

import sim.android.hardware.SensorManager;

public class Activity extends android.app.Activity {
	
	@Override
    public Object getSystemService(String name) {
        if (getBaseContext() == null) {
            throw new IllegalStateException(
                    "System services not available to Activities before onCreate()");
        }
        if(name.equals(SENSOR_SERVICE)) {
        	return new SensorManager();
        }
        return super.getSystemService(name);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy