Search in sources :

Example 31 with UriMatcher

use of android.content.UriMatcher in project aware-client by denzilferreira.

the class Bluetooth_Provider method onCreate.

@Override
public boolean onCreate() {
    AUTHORITY = getContext().getPackageName() + ".provider.bluetooth";
    sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
    sUriMatcher.addURI(Bluetooth_Provider.AUTHORITY, DATABASE_TABLES[0], BT_DEV);
    sUriMatcher.addURI(Bluetooth_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", BT_DEV_ID);
    sUriMatcher.addURI(Bluetooth_Provider.AUTHORITY, DATABASE_TABLES[1], BT_DATA);
    sUriMatcher.addURI(Bluetooth_Provider.AUTHORITY, DATABASE_TABLES[1] + "/#", BT_DATA_ID);
    bluetoothDeviceMap = new HashMap<String, String>();
    bluetoothDeviceMap.put(Bluetooth_Sensor._ID, Bluetooth_Sensor._ID);
    bluetoothDeviceMap.put(Bluetooth_Sensor.TIMESTAMP, Bluetooth_Sensor.TIMESTAMP);
    bluetoothDeviceMap.put(Bluetooth_Sensor.DEVICE_ID, Bluetooth_Sensor.DEVICE_ID);
    bluetoothDeviceMap.put(Bluetooth_Sensor.BT_ADDRESS, Bluetooth_Sensor.BT_ADDRESS);
    bluetoothDeviceMap.put(Bluetooth_Sensor.BT_NAME, Bluetooth_Sensor.BT_NAME);
    bluetoothDataMap = new HashMap<String, String>();
    bluetoothDataMap.put(Bluetooth_Data._ID, Bluetooth_Data._ID);
    bluetoothDataMap.put(Bluetooth_Data.TIMESTAMP, Bluetooth_Data.TIMESTAMP);
    bluetoothDataMap.put(Bluetooth_Data.DEVICE_ID, Bluetooth_Data.DEVICE_ID);
    bluetoothDataMap.put(Bluetooth_Data.BT_ADDRESS, Bluetooth_Data.BT_ADDRESS);
    bluetoothDataMap.put(Bluetooth_Data.BT_NAME, Bluetooth_Data.BT_NAME);
    bluetoothDataMap.put(Bluetooth_Data.BT_RSSI, Bluetooth_Data.BT_RSSI);
    bluetoothDataMap.put(Bluetooth_Data.BT_LABEL, Bluetooth_Data.BT_LABEL);
    return true;
}
Also used : UriMatcher(android.content.UriMatcher)

Example 32 with UriMatcher

use of android.content.UriMatcher in project aware-client by denzilferreira.

the class ESM_Provider method onCreate.

@Override
public boolean onCreate() {
    AUTHORITY = getContext().getPackageName() + ".provider.esm";
    sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
    sUriMatcher.addURI(ESM_Provider.AUTHORITY, DATABASE_TABLES[0], ESMS_QUEUE);
    sUriMatcher.addURI(ESM_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", ESMS_QUEUE_ID);
    questionsMap = new HashMap<>();
    questionsMap.put(ESM_Data._ID, ESM_Data._ID);
    questionsMap.put(ESM_Data.TIMESTAMP, ESM_Data.TIMESTAMP);
    questionsMap.put(ESM_Data.DEVICE_ID, ESM_Data.DEVICE_ID);
    questionsMap.put(ESM_Data.JSON, ESM_Data.JSON);
    questionsMap.put(ESM_Data.STATUS, ESM_Data.STATUS);
    questionsMap.put(ESM_Data.ANSWER_TIMESTAMP, ESM_Data.ANSWER_TIMESTAMP);
    questionsMap.put(ESM_Data.ANSWER, ESM_Data.ANSWER);
    questionsMap.put(ESM_Data.NOTIFICATION_TIMEOUT, ESM_Data.NOTIFICATION_TIMEOUT);
    questionsMap.put(ESM_Data.TRIGGER, ESM_Data.TRIGGER);
    return true;
}
Also used : UriMatcher(android.content.UriMatcher)

Example 33 with UriMatcher

use of android.content.UriMatcher in project aware-client by denzilferreira.

the class Gravity_Provider method onCreate.

@Override
public boolean onCreate() {
    AUTHORITY = getContext().getPackageName() + ".provider.gravity";
    sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
    sUriMatcher.addURI(Gravity_Provider.AUTHORITY, DATABASE_TABLES[0], SENSOR_DEV);
    sUriMatcher.addURI(Gravity_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", SENSOR_DEV_ID);
    sUriMatcher.addURI(Gravity_Provider.AUTHORITY, DATABASE_TABLES[1], SENSOR_DATA);
    sUriMatcher.addURI(Gravity_Provider.AUTHORITY, DATABASE_TABLES[1] + "/#", SENSOR_DATA_ID);
    sensorDeviceMap = new HashMap<String, String>();
    sensorDeviceMap.put(Gravity_Sensor._ID, Gravity_Sensor._ID);
    sensorDeviceMap.put(Gravity_Sensor.TIMESTAMP, Gravity_Sensor.TIMESTAMP);
    sensorDeviceMap.put(Gravity_Sensor.DEVICE_ID, Gravity_Sensor.DEVICE_ID);
    sensorDeviceMap.put(Gravity_Sensor.MAXIMUM_RANGE, Gravity_Sensor.MAXIMUM_RANGE);
    sensorDeviceMap.put(Gravity_Sensor.MINIMUM_DELAY, Gravity_Sensor.MINIMUM_DELAY);
    sensorDeviceMap.put(Gravity_Sensor.NAME, Gravity_Sensor.NAME);
    sensorDeviceMap.put(Gravity_Sensor.POWER_MA, Gravity_Sensor.POWER_MA);
    sensorDeviceMap.put(Gravity_Sensor.RESOLUTION, Gravity_Sensor.RESOLUTION);
    sensorDeviceMap.put(Gravity_Sensor.TYPE, Gravity_Sensor.TYPE);
    sensorDeviceMap.put(Gravity_Sensor.VENDOR, Gravity_Sensor.VENDOR);
    sensorDeviceMap.put(Gravity_Sensor.VERSION, Gravity_Sensor.VERSION);
    sensorDataMap = new HashMap<String, String>();
    sensorDataMap.put(Gravity_Data._ID, Gravity_Data._ID);
    sensorDataMap.put(Gravity_Data.TIMESTAMP, Gravity_Data.TIMESTAMP);
    sensorDataMap.put(Gravity_Data.DEVICE_ID, Gravity_Data.DEVICE_ID);
    sensorDataMap.put(Gravity_Data.VALUES_0, Gravity_Data.VALUES_0);
    sensorDataMap.put(Gravity_Data.VALUES_1, Gravity_Data.VALUES_1);
    sensorDataMap.put(Gravity_Data.VALUES_2, Gravity_Data.VALUES_2);
    sensorDataMap.put(Gravity_Data.ACCURACY, Gravity_Data.ACCURACY);
    sensorDataMap.put(Gravity_Data.LABEL, Gravity_Data.LABEL);
    return true;
}
Also used : UriMatcher(android.content.UriMatcher)

Example 34 with UriMatcher

use of android.content.UriMatcher in project aware-client by denzilferreira.

the class Gyroscope_Provider method onCreate.

@Override
public boolean onCreate() {
    AUTHORITY = getContext().getPackageName() + ".provider.gyroscope";
    sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
    sUriMatcher.addURI(Gyroscope_Provider.AUTHORITY, DATABASE_TABLES[0], GYRO_DEV);
    sUriMatcher.addURI(Gyroscope_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", GYRO_DEV_ID);
    sUriMatcher.addURI(Gyroscope_Provider.AUTHORITY, DATABASE_TABLES[1], GYRO_DATA);
    sUriMatcher.addURI(Gyroscope_Provider.AUTHORITY, DATABASE_TABLES[1] + "/#", GYRO_DATA_ID);
    gyroDeviceMap = new HashMap<String, String>();
    gyroDeviceMap.put(Gyroscope_Sensor._ID, Gyroscope_Sensor._ID);
    gyroDeviceMap.put(Gyroscope_Sensor.TIMESTAMP, Gyroscope_Sensor.TIMESTAMP);
    gyroDeviceMap.put(Gyroscope_Sensor.DEVICE_ID, Gyroscope_Sensor.DEVICE_ID);
    gyroDeviceMap.put(Gyroscope_Sensor.MAXIMUM_RANGE, Gyroscope_Sensor.MAXIMUM_RANGE);
    gyroDeviceMap.put(Gyroscope_Sensor.MINIMUM_DELAY, Gyroscope_Sensor.MINIMUM_DELAY);
    gyroDeviceMap.put(Gyroscope_Sensor.NAME, Gyroscope_Sensor.NAME);
    gyroDeviceMap.put(Gyroscope_Sensor.POWER_MA, Gyroscope_Sensor.POWER_MA);
    gyroDeviceMap.put(Gyroscope_Sensor.RESOLUTION, Gyroscope_Sensor.RESOLUTION);
    gyroDeviceMap.put(Gyroscope_Sensor.TYPE, Gyroscope_Sensor.TYPE);
    gyroDeviceMap.put(Gyroscope_Sensor.VENDOR, Gyroscope_Sensor.VENDOR);
    gyroDeviceMap.put(Gyroscope_Sensor.VERSION, Gyroscope_Sensor.VERSION);
    gyroDataMap = new HashMap<String, String>();
    gyroDataMap.put(Gyroscope_Data._ID, Gyroscope_Data._ID);
    gyroDataMap.put(Gyroscope_Data.TIMESTAMP, Gyroscope_Data.TIMESTAMP);
    gyroDataMap.put(Gyroscope_Data.DEVICE_ID, Gyroscope_Data.DEVICE_ID);
    gyroDataMap.put(Gyroscope_Data.VALUES_0, Gyroscope_Data.VALUES_0);
    gyroDataMap.put(Gyroscope_Data.VALUES_1, Gyroscope_Data.VALUES_1);
    gyroDataMap.put(Gyroscope_Data.VALUES_2, Gyroscope_Data.VALUES_2);
    gyroDataMap.put(Gyroscope_Data.ACCURACY, Gyroscope_Data.ACCURACY);
    gyroDataMap.put(Gyroscope_Data.LABEL, Gyroscope_Data.LABEL);
    return true;
}
Also used : UriMatcher(android.content.UriMatcher)

Example 35 with UriMatcher

use of android.content.UriMatcher in project aware-client by denzilferreira.

the class Installations_Provider method onCreate.

@Override
public boolean onCreate() {
    AUTHORITY = getContext().getPackageName() + ".provider.installations";
    sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
    sUriMatcher.addURI(Installations_Provider.AUTHORITY, DATABASE_TABLES[0], INSTALLATIONS);
    sUriMatcher.addURI(Installations_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", INSTALLATIONS_ID);
    installationsMap = new HashMap<>();
    installationsMap.put(Installations_Data._ID, Installations_Data._ID);
    installationsMap.put(Installations_Data.TIMESTAMP, Installations_Data.TIMESTAMP);
    installationsMap.put(Installations_Data.DEVICE_ID, Installations_Data.DEVICE_ID);
    installationsMap.put(Installations_Data.PACKAGE_NAME, Installations_Data.PACKAGE_NAME);
    installationsMap.put(Installations_Data.APPLICATION_NAME, Installations_Data.APPLICATION_NAME);
    installationsMap.put(Installations_Data.INSTALLATION_STATUS, Installations_Data.INSTALLATION_STATUS);
    installationsMap.put(Installations_Data.PACKAGE_VERSION_NAME, Installations_Data.PACKAGE_VERSION_NAME);
    installationsMap.put(Installations_Data.PACKAGE_VERSION_CODE, Installations_Data.PACKAGE_VERSION_CODE);
    return true;
}
Also used : UriMatcher(android.content.UriMatcher)

Aggregations

UriMatcher (android.content.UriMatcher)69 SmallTest (android.test.suitebuilder.annotation.SmallTest)13 TableDetails (me.himanshusoni.quantumflux.model.generate.TableDetails)1