UriMatcher该类
实现内容匹配时共享信息
.addURI(authority,path,自定义代码):接受3个参数
然后通过
.match(uri);用uri匹配对象对应的代码,通过该方法,判断调用方想访问哪张表
UriMatcher uri = new UriMatcher(UriMatcher.No_MATCH);
查询table表中所有数据
uri.addURI("com.example.app.provider","table",0);
查询table表中的单条数据
uri.addURI("com.example.app.provider","table/#",1);
网友评论