2013/05/31

Last day here. (at 街旁台灣office)





Last day here. (at 街旁台灣office)






via Tumblr http://cyberrob.tumblr.com/post/51793096468

2013/05/30

at Book11





at Book11






via Tumblr http://cyberrob.tumblr.com/post/51715576158

lot of #sushi





lot of #sushi






via Tumblr http://cyberrob.tumblr.com/post/51704462158

Managing Network Usage | Android Developers

From Evernote:

Managing Network Usage | Android Developers

Clipped from: http://developer.android.com/training/basics/network-ops/managing.html
對於使用BroadcastReceiver,有兩種宣告的方法。一種是在Activity的onCreate()/onDestroy()時註冊或解除的方法,而另一種是直接定義在Maniest中。

Android Doc提到於Activity中操作的方法較為「輕量」,「負擔較小」!
因為定義在Manifest中的話,當Filter攔截到任何broadcast都會喚起你的app,就算你的app並沒有啓動!甚至長達幾個禮拜。
但在Activity中定義的話,若App沒有啓動,那任何Broadcast都不會喚起你的app。

凡事有例外。

若你在Manifest中定義,但你只在某幾個狀況下才需要收到Broadcast,那可以使用setComponentEnabledSetting() 來啟用或關閉 你的 BroadcastReceiver!

Setting up a BroadcastReceiver that gets called unnecessarily can be a drain on system resources. The sample application registers the BroadcastReceiver NetworkReceiver in onCreate(), and it unregisters it in onDestroy(). This is more lightweight than declaring a <receiver> in the manifest. When you declare a <receiver> in the manifest, it can wake up your app at any time, even if you haven't run it for weeks. By registering and unregistering NetworkReceiver within the main activity, you ensure that the app won't be woken up after the user leaves the app. If you do declare a <receiver> in the manifest and you know exactly where you need it, you can use setComponentEnabledSetting() to enable and disable it as appropriate.


2013/05/29

泰式涼麵來一碗





泰式涼麵來一碗






via Tumblr http://cyberrob.tumblr.com/post/51618084739

2013/05/03

at 瓦薩PIZZA





at 瓦薩PIZZA






via Tumblr http://cyberrob.tumblr.com/post/49493610916