use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Network_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.network";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Network_Provider.AUTHORITY, DATABASE_TABLES[0], NETWORK);
sUriMatcher.addURI(Network_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", NETWORK_ID);
networkProjectionMap = new HashMap<String, String>();
networkProjectionMap.put(Network_Data._ID, Network_Data._ID);
networkProjectionMap.put(Network_Data.TIMESTAMP, Network_Data.TIMESTAMP);
networkProjectionMap.put(Network_Data.DEVICE_ID, Network_Data.DEVICE_ID);
networkProjectionMap.put(Network_Data.TYPE, Network_Data.TYPE);
networkProjectionMap.put(Network_Data.SUBTYPE, Network_Data.SUBTYPE);
networkProjectionMap.put(Network_Data.STATE, Network_Data.STATE);
return true;
}
use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Processor_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.processor";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Processor_Provider.AUTHORITY, DATABASE_TABLES[0], PROCESSOR);
sUriMatcher.addURI(Processor_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", PROCESSOR_ID);
processorProjectionMap = new HashMap<String, String>();
processorProjectionMap.put(Processor_Data._ID, Processor_Data._ID);
processorProjectionMap.put(Processor_Data.TIMESTAMP, Processor_Data.TIMESTAMP);
processorProjectionMap.put(Processor_Data.DEVICE_ID, Processor_Data.DEVICE_ID);
processorProjectionMap.put(Processor_Data.LAST_USER, Processor_Data.LAST_USER);
processorProjectionMap.put(Processor_Data.LAST_SYSTEM, Processor_Data.LAST_SYSTEM);
processorProjectionMap.put(Processor_Data.LAST_IDLE, Processor_Data.LAST_IDLE);
processorProjectionMap.put(Processor_Data.USER_LOAD, Processor_Data.USER_LOAD);
processorProjectionMap.put(Processor_Data.SYSTEM_LOAD, Processor_Data.SYSTEM_LOAD);
processorProjectionMap.put(Processor_Data.IDLE_LOAD, Processor_Data.IDLE_LOAD);
return true;
}
use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Proximity_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.proximity";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Proximity_Provider.AUTHORITY, DATABASE_TABLES[0], SENSOR_DEV);
sUriMatcher.addURI(Proximity_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", SENSOR_DEV_ID);
sUriMatcher.addURI(Proximity_Provider.AUTHORITY, DATABASE_TABLES[1], SENSOR_DATA);
sUriMatcher.addURI(Proximity_Provider.AUTHORITY, DATABASE_TABLES[1] + "/#", SENSOR_DATA_ID);
sensorMap = new HashMap<String, String>();
sensorMap.put(Proximity_Sensor._ID, Proximity_Sensor._ID);
sensorMap.put(Proximity_Sensor.TIMESTAMP, Proximity_Sensor.TIMESTAMP);
sensorMap.put(Proximity_Sensor.DEVICE_ID, Proximity_Sensor.DEVICE_ID);
sensorMap.put(Proximity_Sensor.MAXIMUM_RANGE, Proximity_Sensor.MAXIMUM_RANGE);
sensorMap.put(Proximity_Sensor.MINIMUM_DELAY, Proximity_Sensor.MINIMUM_DELAY);
sensorMap.put(Proximity_Sensor.NAME, Proximity_Sensor.NAME);
sensorMap.put(Proximity_Sensor.POWER_MA, Proximity_Sensor.POWER_MA);
sensorMap.put(Proximity_Sensor.RESOLUTION, Proximity_Sensor.RESOLUTION);
sensorMap.put(Proximity_Sensor.TYPE, Proximity_Sensor.TYPE);
sensorMap.put(Proximity_Sensor.VENDOR, Proximity_Sensor.VENDOR);
sensorMap.put(Proximity_Sensor.VERSION, Proximity_Sensor.VERSION);
sensorDataMap = new HashMap<String, String>();
sensorDataMap.put(Proximity_Data._ID, Proximity_Data._ID);
sensorDataMap.put(Proximity_Data.TIMESTAMP, Proximity_Data.TIMESTAMP);
sensorDataMap.put(Proximity_Data.DEVICE_ID, Proximity_Data.DEVICE_ID);
sensorDataMap.put(Proximity_Data.PROXIMITY, Proximity_Data.PROXIMITY);
sensorDataMap.put(Proximity_Data.ACCURACY, Proximity_Data.ACCURACY);
sensorDataMap.put(Proximity_Data.LABEL, Proximity_Data.LABEL);
return true;
}
use of android.content.UriMatcher in project aware-client by denzilferreira.
the class Significant_Provider method onCreate.
@Override
public boolean onCreate() {
AUTHORITY = getContext().getPackageName() + ".provider.significant";
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(Significant_Provider.AUTHORITY, DATABASE_TABLES[0], SENSOR_DATA);
sUriMatcher.addURI(Significant_Provider.AUTHORITY, DATABASE_TABLES[0] + "/#", SENSOR_DATA_ID);
sensorDataMap = new HashMap<>();
sensorDataMap.put(Significant_Data._ID, Significant_Data._ID);
sensorDataMap.put(Significant_Data.TIMESTAMP, Significant_Data.TIMESTAMP);
sensorDataMap.put(Significant_Data.DEVICE_ID, Significant_Data.DEVICE_ID);
sensorDataMap.put(Significant_Data.IS_MOVING, Significant_Data.IS_MOVING);
return true;
}
Aggregations