请问大家 在2.2中 
Cursor pCur = cr.query(People.CONTENT_URI,
new String[] { People.PRESENCE_STATUS ,People.NAME}, null, null,
People.DISPLAY_NAME);
这样查询的是那个表?

解决方案 »

  1.   

    People.PRESENCE_STATUS, 其实就是people表的mode字段。这可不一定滴。这个字段可能来自其他的表,People.PRESENCE_STATUS很可能是多个表联合查询后的某个投影(Projectsion)字段。举个例子:
    用户表:user(id,name)
    状态表: user_state(userId,mode)查询:
    select id,name,mode
    from user as a inner join user_state as b on a.id=b.userId所以,mode是从user_state表里查出来的。
    People.PRESENCE_STATUS也有可能是个聚合值。
    但是我也找不到它从哪里来的,嘿嘿!
      

  2.   

    从代码上看,在presence_db这个数据库中有个presence表,在这里面的可能性比较大。
    另外,这个数据库你可能找不到,因为它是基于内存的,你用adb shell来查查看吧。
      

  3.   

    非常感谢,那怎么通过adb shell 来查看呢?
      

  4.   

    例子:$ adb -s emulator-5554 shell
    # sqlite3 /data/data/com.example.google.rss.rssexample/databases/rssitems.db
    SQLite version 3.3.12
    Enter ".help" for instructions
    .... enter commands, then quit...
    sqlite> .exit 具体内容你可以看看adb的帮助