use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Keyboard_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.keyboard";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Keyboard_Provider.AUTHORITY, DATABASE_TABLES[0], KEYBOARD);
sUriMatcher.addURI(Installations_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", KEYBOARD_ID);
dataMap = new HashMap<String, String>();
dataMap.put(Keyboard_Data._ID, Keyboard_Data._ID);
dataMap.put(Keyboard_Data.TIMESTAMP, Keyboard_Data.TIMESTAMP);
dataMap.put(Keyboard_Data.DEVICE_ID, Keyboard_Data.DEVICE_ID);
dataMap.put(Keyboard_Data.PACKAGE_NAME, Keyboard_Data.PACKAGE_NAME);
dataMap.put(Keyboard_Data.BEFORE_TEXT, Keyboard_Data.BEFORE_TEXT);
dataMap.put(Keyboard_Data.CURRENT_TEXT, Keyboard_Data.CURRENT_TEXT);
dataMap.put(Keyboard_Data.IS_PASSWORD, Keyboard_Data.IS_PASSWORD);
return true;
}
use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Light_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.light";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Light_Provider.AUTHORITY, DATABASE_TABLES[0], SENSOR_DEV);
sUriMatcher.addURI(Light_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", SENSOR_DEV_ID);
sUriMatcher.addURI(Light_Provider.AUTHORITY, DATABASE_TABLES[1], SENSOR_DATA);
sUriMatcher.addURI(Light_Provider.AUTHORITY, DATABASE_TABLES[1] + "/#", SENSOR_DATA_ID);
sensorMap = new HashMap<String, String>();
sensorMap.put(Light_Sensor._ID, Light_Sensor._ID);
sensorMap.put(Light_Sensor.TIMESTAMP, Light_Sensor.TIMESTAMP);
sensorMap.put(Light_Sensor.DEVICE_ID, Light_Sensor.DEVICE_ID);
sensorMap.put(Light_Sensor.MAXIMUM_RANGE, Light_Sensor.MAXIMUM_RANGE);
sensorMap.put(Light_Sensor.MINIMUM_DELAY, Light_Sensor.MINIMUM_DELAY);
sensorMap.put(Light_Sensor.NAME, Light_Sensor.NAME);
sensorMap.put(Light_Sensor.POWER_MA, Light_Sensor.POWER_MA);
sensorMap.put(Light_Sensor.RESOLUTION, Light_Sensor.RESOLUTION);
sensorMap.put(Light_Sensor.TYPE, Light_Sensor.TYPE);
sensorMap.put(Light_Sensor.VENDOR, Light_Sensor.VENDOR);
sensorMap.put(Light_Sensor.VERSION, Light_Sensor.VERSION);
sensorDataMap = new HashMap<String, String>();
sensorDataMap.put(Light_Data._ID, Light_Data._ID);
sensorDataMap.put(Light_Data.TIMESTAMP, Light_Data.TIMESTAMP);
sensorDataMap.put(Light_Data.DEVICE_ID, Light_Data.DEVICE_ID);
sensorDataMap.put(Light_Data.LIGHT_LUX, Light_Data.LIGHT_LUX);
sensorDataMap.put(Light_Data.ACCURACY, Light_Data.ACCURACY);
sensorDataMap.put(Light_Data.LABEL, Light_Data.LABEL);
return true;
}
use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Locations_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.locations";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Locations_Provider.AUTHORITY, DATABASE_TABLES[0], LOCATIONS);
locationsProjectionMap = new HashMap<String, String>();
locationsProjectionMap.put(Locations_Data._ID, Locations_Data._ID);
locationsProjectionMap.put(Locations_Data.TIMESTAMP, Locations_Data.TIMESTAMP);
locationsProjectionMap.put(Locations_Data.DEVICE_ID, Locations_Data.DEVICE_ID);
locationsProjectionMap.put(Locations_Data.LATITUDE, Locations_Data.LATITUDE);
locationsProjectionMap.put(Locations_Data.LONGITUDE, Locations_Data.LONGITUDE);
locationsProjectionMap.put(Locations_Data.BEARING, Locations_Data.BEARING);
locationsProjectionMap.put(Locations_Data.SPEED, Locations_Data.SPEED);
locationsProjectionMap.put(Locations_Data.ALTITUDE, Locations_Data.ALTITUDE);
locationsProjectionMap.put(Locations_Data.PROVIDER, Locations_Data.PROVIDER);
locationsProjectionMap.put(Locations_Data.ACCURACY, Locations_Data.ACCURACY);
locationsProjectionMap.put(Locations_Data.LABEL, Locations_Data.LABEL);
return true;
}
use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Mqtt_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.mqtt";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Mqtt_Provider.AUTHORITY, DATABASE_TABLES[0], MQTT);
sUriMatcher.addURI(Mqtt_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", MQTT_ID);
sUriMatcher.addURI(Mqtt_Provider.AUTHORITY, DATABASE_TABLES[1], MQTT_SUBSCRIPTION);
sUriMatcher.addURI(Mqtt_Provider.AUTHORITY, DATABASE_TABLES[1] + "/#", MQTT_SUBSCRIPTION_ID);
messagesMap = new HashMap<String, String>();
messagesMap.put(Mqtt_Messages.MQTT_ID, Mqtt_Messages.MQTT_ID);
messagesMap.put(Mqtt_Messages.TIMESTAMP, Mqtt_Messages.TIMESTAMP);
messagesMap.put(Mqtt_Messages.DEVICE_ID, Mqtt_Messages.DEVICE_ID);
messagesMap.put(Mqtt_Messages.MESSAGE, Mqtt_Messages.MESSAGE);
messagesMap.put(Mqtt_Messages.TOPIC, Mqtt_Messages.TOPIC);
messagesMap.put(Mqtt_Messages.STATUS, Mqtt_Messages.STATUS);
subscriptionMap = new HashMap<String, String>();
subscriptionMap.put(Mqtt_Subscriptions.MQTT_SUBSCRIPTION_ID, Mqtt_Subscriptions.MQTT_SUBSCRIPTION_ID);
subscriptionMap.put(Mqtt_Subscriptions.TIMESTAMP, Mqtt_Subscriptions.TIMESTAMP);
subscriptionMap.put(Mqtt_Subscriptions.DEVICE_ID, Mqtt_Subscriptions.DEVICE_ID);
subscriptionMap.put(Mqtt_Subscriptions.TOPIC, Mqtt_Subscriptions.TOPIC);
return true;
}
use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Rotation_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.rotation";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Rotation_Provider.AUTHORITY, DATABASE_TABLES[0], SENSOR_DEV);
sUriMatcher.addURI(Rotation_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", SENSOR_DEV_ID);
sUriMatcher.addURI(Rotation_Provider.AUTHORITY, DATABASE_TABLES[1], SENSOR_DATA);
sUriMatcher.addURI(Rotation_Provider.AUTHORITY, DATABASE_TABLES[1] + "/#", SENSOR_DATA_ID);
sensorMap = new HashMap<String, String>();
sensorMap.put(Rotation_Sensor._ID, Rotation_Sensor._ID);
sensorMap.put(Rotation_Sensor.TIMESTAMP, Rotation_Sensor.TIMESTAMP);
sensorMap.put(Rotation_Sensor.DEVICE_ID, Rotation_Sensor.DEVICE_ID);
sensorMap.put(Rotation_Sensor.MAXIMUM_RANGE, Rotation_Sensor.MAXIMUM_RANGE);
sensorMap.put(Rotation_Sensor.MINIMUM_DELAY, Rotation_Sensor.MINIMUM_DELAY);
sensorMap.put(Rotation_Sensor.NAME, Rotation_Sensor.NAME);
sensorMap.put(Rotation_Sensor.POWER_MA, Rotation_Sensor.POWER_MA);
sensorMap.put(Rotation_Sensor.RESOLUTION, Rotation_Sensor.RESOLUTION);
sensorMap.put(Rotation_Sensor.TYPE, Rotation_Sensor.TYPE);
sensorMap.put(Rotation_Sensor.VENDOR, Rotation_Sensor.VENDOR);
sensorMap.put(Rotation_Sensor.VERSION, Rotation_Sensor.VERSION);
sensorDataMap = new HashMap<String, String>();
sensorDataMap.put(Rotation_Data._ID, Rotation_Data._ID);
sensorDataMap.put(Rotation_Data.TIMESTAMP, Rotation_Data.TIMESTAMP);
sensorDataMap.put(Rotation_Data.DEVICE_ID, Rotation_Data.DEVICE_ID);
sensorDataMap.put(Rotation_Data.VALUES_0, Rotation_Data.VALUES_0);
sensorDataMap.put(Rotation_Data.VALUES_1, Rotation_Data.VALUES_1);
sensorDataMap.put(Rotation_Data.VALUES_2, Rotation_Data.VALUES_2);
sensorDataMap.put(Rotation_Data.VALUES_3, Rotation_Data.VALUES_3);
sensorDataMap.put(Rotation_Data.ACCURACY, Rotation_Data.ACCURACY);
sensorDataMap.put(Rotation_Data.LABEL, Rotation_Data.LABEL);
return true;
}
Aggregations