→ k70709: Content Provider 06/03 16:05
推 aiweisen: 我目前寫的程式架構也是跟line很像 但是取資料我個人 06/03 23:40
→ aiweisen: 不是很喜歡用thread 我都是用asynctask居多 06/03 23:42
推 aiweisen: 你要loading圖示 就可以用 asynctask配progressdailog 06/03 23:44
→ aiweisen: 在onpre那邊開啟 onpost那邊關掉 06/03 23:46
→ aiweisen: 我會用到thread的機會 就是固定每幾秒去server拿資料 06/03 23:47
→ aiweisen: 才會用到 不然幾乎都不用 06/03 23:47
→ playerlove1: k大可以細說嗎? 因為我對cp的認識是sqlite跟取得手 06/04 00:10
→ playerlove1: 機通訊錄這樣@@ 06/04 00:10
→ playerlove1: 好的感謝a大 我再試試看asynctask 06/04 00:11
→ k70709: 我之前是將網上資料讀取後存入sql然後在用CP去做存取 06/04 01:41
→ k70709: 避免每次都需要花費時間透過網路抓資料,只需要抓新的資料 06/04 01:43
→ playerlove1: 好的感謝a大 我明白了 06/04 07:40
→ playerlove1: 是k大 不好意思打錯了 06/04 09:01
推 givemepass: 抓小東西可以用asynctask 如果資料很大 自己開thread 06/05 00:20
→ givemepass: 畢竟asynctask是跑在main thread 只是讓你省下handler 06/05 00:21
→ ssccg: asynctask不是跑在main thread...在main thread幹麻還async 06/05 00:26
→ ssccg: asynctask預設是跑在AsyncTask.SERIAL_EXECUTOR 06/05 00:28
→ ssccg: 執行在一個所有asynctask共用的背景thread上 06/05 00:29
推 givemepass: 對, 我在打什麼阿...樓上講的才是對的 06/05 00:57
→ givemepass: 應該是說共用threadpool & handler 06/05 00:59
推 givemepass: 如果資料龐大就自己開thread去載 不然asynctask是會 06/05 01:06
→ givemepass: 排隊的 06/05 01:06
→ playerlove1: 好的 感謝大大們的回覆 又多學了一課 06/06 18:27