Code example for Uri.Builder

Methods: appendPath, authority, build, scheme

0
        values.put("dst", msg.getTo());
        values.put("via", bareTo);
        values.put("msg", text.trim());
        database.insert("msg", "_id", values);
 
        Builder builder = new Uri.Builder();
        builder.scheme("content");
        builder.authority("jabber-chat-db");
        builder.appendPath(bareTo);
        builder.appendPath(bareFrom);
        context.getContentResolver().notifyChange(builder.build(), null);
 
        setNotification(bareFrom, bareTo);
    } 
 
    /** 
     * Create a new notification for a given local/remote user pair. 
     * @param from The local account jid. 
     * @param to The remote account jid. 
     */ 
    private final void setNotification(String from, String to) {