-
Context ctx=MainActivity.this;
-
ContentResolver resolver =ctx.getContentResolver();
-
Uri uri=Uri.parse("content://com.example.androidtestdemo");
-
Cursor c = resolver.query(uri, null, null, null, null);
-
c.moveToFirst();
-
while(!c.isAfterLast()){
-
for(int i=0,j=c.getColumnCount();i<j;i++){
-
Log.v("Android2",""+c.getString(i));
-
}
-
c.moveToNext();
-
}
读取收件箱信息:
<span style="font-size:18px;"><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">private</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">void</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> getMsgs</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(){</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">Uri</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> uri </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">Uri</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">parse</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"content://sms/"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">ContentResolver</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> resolver </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> getContentResolver</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">();</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="com" style="border: 0px; margin: 0px; padding: 0px; color: rgb(136, 0, 0);">//获取的是哪些列的信息</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">Cursor</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> cursor </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> resolver</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">query</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">uri</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">new</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">String</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">[]{</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"address"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"date"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"type"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"body"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">},</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">null</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">null</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">null</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">while</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">cursor</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">moveToNext</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">())</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">{</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">String</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> address </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> cursor</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">getString</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="lit" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">0</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">String</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> date </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> cursor</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">getString</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="lit" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">1</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">String</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> type </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> cursor</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">getString</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="lit" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">2</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">String</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> body </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> cursor</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">getString</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="lit" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">3</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">System</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">out</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">println</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"地址:"</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">+</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> address</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">System</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">out</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">println</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"时间:"</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">+</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> date</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">System</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">out</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">println</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"类型:"</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">+</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> type</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">System</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">out</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">println</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"内容:"</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">+</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> body</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">System</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">out</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">println</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"======================"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">}</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
cursor</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">close</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">();</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">}</span></span>
往AndroidManifest.xml加入读取收件箱的权限:
<span style="font-size:18px;"><span class="tag" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);"><uses-permission</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="atn" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">android:name</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="atv" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"android.permission.READ_SMS"</span><span class="tag" style="border: 0px; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">/></span></span>
往收件箱里插入一条信息
<span style="font-size:18px;"><span class="kwd" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">private</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="kwd" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">void</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> insertMsg</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">()</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">{</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">ContentResolver</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> resolver </span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> getContentResolver</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">();</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">Uri</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> uri </span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="typ" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">Uri</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">parse</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"content://sms/"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">ContentValues</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> conValues </span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">=</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="kwd" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">new</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="typ" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">ContentValues</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">();</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
conValues</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">put</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"address"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"123456789"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
conValues</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">put</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"type"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="lit" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">1</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
conValues</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">put</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"date"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="typ" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">System</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">currentTimeMillis</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">());</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
conValues</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">put</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"body"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"no zuo no die why you try!"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
resolver</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">insert</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">uri</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> conValues</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="typ" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">Log</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">.</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">e</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">(</span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"HeHe"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">,</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);"> </span><span class="str" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">"短信插入完毕~"</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">);</span><span class="pln" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(0, 0, 0);">
</span><span class="pun" style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; padding: 0px; color: rgb(102, 102, 0);">}</span></span>