Back to project page AndroidLibraryProject.
The source code is released under:
Apache License
If you think the Android project AndroidLibraryProject listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright (c) 2013-14 by CDAC Chennai * /*from w ww . ja v a 2s .c om*/ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * @File CAFConfig * @Created: 18.11.2013 * @author: Prasenjit * Last Change: 18.11.2013 by Prasenjit */ package com.contextawareframework.globalvariable; /** * All variable are globally accessible and can have only one state in * application. This provides a facility to disable any sensor listener * based on any condition. */ public class CAFConfig { // Boolean variable to enable / disable available sensors private static boolean sensorAccelerometer = false; private static boolean SensorProximity = false; private static boolean sensorLight = false; private static boolean sensorLocation = false; private static boolean sensorGyroscope = false; private static boolean sensorMagnetometer = false; private static boolean batteryStatus = false; // Presently not in use. private static boolean sensorAccelerometerHighpass = false; private static boolean sensorAccelerometerLowpass = false; // Boolean Variables to enable table creation in the database private static boolean tableAccelerometer = false; private static boolean tableProximity = false; private static boolean tableLocation = false; private static boolean tableLight = false; private static boolean tableGyroscope = false; private static boolean tableMagnetometer = false; private static boolean tableBattery = false; private static boolean tableUserinfo = false; private static boolean enableDebugging = false; /** * Method to get sensorAccelerometer boolean value * @return the sensorAccelerometer */ public static final boolean isSensorAccelerometer() { return sensorAccelerometer; } /** * Method to set sensorAccelerometer boolean value * @param sensorAccelerometer the sensorAccelerometer to set */ public static final void setSensorAccelerometer(boolean sensorAccelerometer) { CAFConfig.sensorAccelerometer = sensorAccelerometer; } /** * Method to get sensorProximity boolean value * @return the sensorProximity */ public static final boolean isSensorProximity() { return SensorProximity; } /** * Method to set sensorProximity boolean value * @param sensorProximity the sensorProximity to set */ public static final void setSensorProximity(boolean sensorProximity) { SensorProximity = sensorProximity; } /** * @return the sensorLight */ public static final boolean isSensorLight() { return sensorLight; } /** * Method to set sensorLight boolean value * @param sensorLight the sensorLight to set */ public static final void setSensorLight(boolean sensorLight) { CAFConfig.sensorLight = sensorLight; } /** * Method to get sensorLight boolean value * @return the sensorLocation */ public static final boolean isSensorLocation() { return sensorLocation; } /** * Method to set sensorLocation boolean value * @param sensorLocation the sensorLocation to set */ public static final void setSensorLocation(boolean sensorLocation) { CAFConfig.sensorLocation = sensorLocation; } /** * Method to get batteryStatus boolean value * @return the batteryStatus */ public static final boolean isBatteryStatus() { return batteryStatus; } /** * Method to set batteryStatus boolean value * @param sensorBattery the batteryStatus to set */ public static final void setBatteryStatus(boolean batteryStatus) { CAFConfig.batteryStatus = batteryStatus; } /** * @return the sensorAccelerometerHighpass */ public static final boolean isSensorAccelerometerHighpass() { return sensorAccelerometerHighpass; } /** * @param sensorAccelerometerHighpass the sensorAccelerometerHighpass to set */ public static final void setSensorAccelerometerHighpass( boolean sensorAccelerometerHighpass) { CAFConfig.sensorAccelerometerHighpass = sensorAccelerometerHighpass; } /** * Method to get sensorAccelerometerLowpass boolean value * @return the sensorAccelerometerLowpass */ public static final boolean isSensorAccelerometerLowpass() { return sensorAccelerometerLowpass; } /** * Method to set sensorAccelerometerLowpass boolean value * @param sensorAccelerometerLowpass the sensorAccelerometerLowpass to set */ public static final void setSensorAccelerometerLowpass( boolean sensorAccelerometerLowpass) { CAFConfig.sensorAccelerometerLowpass = sensorAccelerometerLowpass; } /** * Method to get tableAccelerometer boolean value * @return the tableAccelerometer */ public static final boolean isTableAccelerometer() { return tableAccelerometer; } /** * Method to set tableAccelerometer boolean value * @param tableAccelerometer the tableAccelerometer to set */ public static final void setTableAccelerometer(boolean tableAccelerometer) { CAFConfig.tableAccelerometer = tableAccelerometer; } /** * Method to get tableProximity boolean value * @return the tableProximity */ public static final boolean isTableProximity() { return tableProximity; } /** * Method to set tableProximity boolean value * @param tableProximity the tableProximity to set */ public static final void setTableProximity(boolean tableProximity) { CAFConfig.tableProximity = tableProximity; } /** * Method to get tableLocation boolean value * @return the tableLocation */ public static final boolean isTableLocation() { return tableLocation; } /** * Method to set tableLocation boolean value * @param tableLocation the tableLocation to set */ public static final void setTableLocation(boolean tableLocation) { CAFConfig.tableLocation = tableLocation; } /** * Method to get tableLight boolean value * @return the tableLight */ public static final boolean isTableLight() { return tableLight; } /** * Method to set tableLight boolean value * @param tableLight the tableLight to set */ public static final void setTableLight(boolean tableLight) { CAFConfig.tableLight = tableLight; } /** * Method to get tableBattery boolean value * @return the tableBattery */ public static final boolean isTableBattery() { return tableBattery; } /** * Method to set tableBattery boolean value * @param tableBattery the tableBattery to set */ public static final void setTableBattery(boolean tableBattery) { CAFConfig.tableBattery = tableBattery; } /** * Method to get tableUserInfo boolean value * @return the tableUserinfo */ public static final boolean isTableUserinfo() { return tableUserinfo; } /** * Method to set tableUserinfo boolean value * @param tableUserinfo the tableUserinfo to set */ public static final void setTableUserinfo(boolean tableUserinfo) { CAFConfig.tableUserinfo = tableUserinfo; } /** * Method to get enableDebugging boolean value * @return the enableDebugging */ public static final boolean isEnableDebugging() { return enableDebugging; } /** * Method to set enableDebugging boolean value * @param enableDebugging the enableDebugging to set */ public static final void setEnableDebugging(boolean enableDebugging) { CAFConfig.enableDebugging = enableDebugging; } /** * @return the sensorGyroscope */ public static final boolean isSensorGyroscope() { return sensorGyroscope; } /** * @param sensorGyroscope the sensorGyroscope to set */ public static final void setSensorGyroscope(boolean sensorGyroscope) { CAFConfig.sensorGyroscope = sensorGyroscope; } /** * @return the tableGyroscope */ public static final boolean isTableGyroscope() { return tableGyroscope; } /** * @param tableGyroscope the tableGyroscope to set */ public static final void setTableGyroscope(boolean tableGyroscope) { CAFConfig.tableGyroscope = tableGyroscope; } /** * @return the sensorMagnetometer */ public static final boolean isSensorMagnetometer() { return sensorMagnetometer; } /** * @param sensorMagnetometer the sensorMagnetometer to set */ public static final void setSensorMagnetometer(boolean sensorMagnetometer) { CAFConfig.sensorMagnetometer = sensorMagnetometer; } /** * @return the tableMagnetometer */ public static final boolean isTableMagnetometer() { return tableMagnetometer; } /** * @param tableMagnetometer the tableMagnetometer to set */ public static final void setTableMagnetometer(boolean tableMagnetometer) { CAFConfig.tableMagnetometer = tableMagnetometer; } }