Code example for Uri

Methods: notifyChange, getPathSegments

0
                        DATABASE_TABLE,
                        arg1,
                        arg2);
                break; 
            case VIBRATION_ID:
                String id = arg0.getPathSegments().get(1);
                if (Integer.parseInt(id) == 0) {
                    Log.i(TAG, "Not deleting default vibration");
                    return count;
                } 
                count = vibrationsDB.delete(
                        DATABASE_TABLE,
                        _ID + " = " + id +
                                (!TextUtils.isEmpty(arg1) ? " AND (" +
                                        arg1 + ')' : ""),
                        arg2);
                break; 
            default: 
                throw new IllegalArgumentException(
                        "Unknown URI " + arg0);
        } 
        getContext().getContentResolver().notifyChange(arg0, null);
        return count;
    } 
 
    @Override 
    public int update(Uri uri, ContentValues values,