Android Open Source - AndroidLibraryProject C A F Config






From Project

Back to project page AndroidLibraryProject.

License

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.

Java Source Code

/*
 * 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;
  }
  

}




Java Source Code List

.BatteryDbHelper.java
.Bluetooth.java
.Camera.java
.Gravity.java
.Humidity.java
.Microphone.java
.NFC.java
.Orientation.java
.Pressure.java
.SDCard.java
.Telephony.java
.Temparature.java
.USB.java
.Wifi.java
com.contextawareframework.backgroundservices.AccelerometerDataListener.java
com.contextawareframework.backgroundservices.BatteryDataService.java
com.contextawareframework.backgroundservices.CAFService.java
com.contextawareframework.backgroundservices.GPSTracker.java
com.contextawareframework.backgroundservices.GyroscopeDataListener.java
com.contextawareframework.backgroundservices.LightDataListener.java
com.contextawareframework.backgroundservices.LocationDataListener.java
com.contextawareframework.backgroundservices.MagnetometerDataListener.java
com.contextawareframework.backgroundservices.ProximityDataListener.java
com.contextawareframework.backgroundservices.SoundRecorder.java
com.contextawareframework.backgroundservices.Text2Speech.java
com.contextawareframework.contextawarefunctions.ContextAwareFunction.java
com.contextawareframework.controller.BatteryController.java
com.contextawareframework.controller.SensorController.java
com.contextawareframework.dataanalysis.AccelerometerDataAnalysis.java
com.contextawareframework.dataanalysis.ApplicationDataAnalysis.java
com.contextawareframework.dataanalysis.LocationDataAnalysis.java
com.contextawareframework.dbmanager.AccelerometerDbHelper.java
com.contextawareframework.dbmanager.ContextAwareSQLiteHelper.java
com.contextawareframework.dbmanager.GyroscopeDbHelper.java
com.contextawareframework.dbmanager.LightDbHelper.java
com.contextawareframework.dbmanager.LocationDbHelper.java
com.contextawareframework.dbmanager.MagnetometerDbHelper.java
com.contextawareframework.dbmanager.ProximityDbHelper.java
com.contextawareframework.dbmanager.UserInfoDbHelper.java
com.contextawareframework.exceptions.AccelerometerSensorException.java
com.contextawareframework.exceptions.BatteryException.java
com.contextawareframework.exceptions.CAFException.java
com.contextawareframework.exceptions.GyrometerSensorException.java
com.contextawareframework.exceptions.LightSensorException.java
com.contextawareframework.exceptions.LocationServiceException.java
com.contextawareframework.exceptions.MagnetometerSensorException.java
com.contextawareframework.exceptions.ProximitySensorException.java
com.contextawareframework.exceptions.SDCardException.java
com.contextawareframework.exceptions.SQLiteQueryException.java
com.contextawareframework.exceptions.SensorException.java
com.contextawareframework.globalvariable.CAFConfig.java
com.contextawareframework.notificationservice.IssueNotification.java
com.contextawareframework.os.Battery.java
com.contextawareframework.os.CAFPowerManager.java
com.contextawareframework.os.UserInfo.java
com.contextawareframework.probe.Probe.java
com.contextawareframework.probe.WfiProbe.java
com.contextawareframework.querymodule.BaseQueryClass.java
com.contextawareframework.querymodule.DeveloperInfo.java
com.contextawareframework.querymodule.UserIdentification.java
com.contextawareframework.security.FileEncryptor.java
com.contextawareframework.security.JavaDESEncryption.java
com.contextawareframework.sensorlistener.BatteryListener.java
com.contextawareframework.sensorlistener.SensorListener.java
com.contextawareframework.sensors.environmentsensors.Light.java
com.contextawareframework.sensors.motionsensors.Accelerometer.java
com.contextawareframework.sensors.motionsensors.Gyrometer.java
com.contextawareframework.sensors.positionsensors.LocationPojo.java
com.contextawareframework.sensors.positionsensors.Magnetometer.java
com.contextawareframework.sensors.positionsensors.Proximity.java
com.contextawareframework.uploadmanager.BackupDb.java
com.contextawareframework.uploadmanager.UploadScheduler.java
com.contextawareframework.uploadmanager.UploadToServer.java
com.contextawareframework.utility.CsvFileWriter.java
com.example.frameworktestcase.FrameworkFunctionalTestActivity.java
com.example.frameworktestcase.MainActivity.java
com.example.frameworktestcase.SecondActivity.java
com.example.frameworktestcase.Singleton.java