上次介紹了如何使用JAVA的反射機制來調用藍芽的隱藏API,這次繼續練習JAVA的反射機制,探秘TelephonyManager在Framework裡包含卻在SDK隱藏的幾項功能。先來看看本文程式啟動並執行: 本文程式示範了以下功能:1.所有來電自動接聽;2.所有來電自動掛斷;3.開啟/關閉Radio;4.開啟/關閉資料連線(WAP or
Content Providers是Android四大組件之一,扮演者非常重要的角色,看下官方文檔對它的解釋:Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that
關於案頭widget的動態重新整理有這樣一個配置,在res/xml下<appwiget-provider>下有一個屬性android:updatePeriodMillis="86400000"官方的注釋是:[plain] The updatePeriodMillis attribute defines how often the App Widget framework should request an update from the
andling affinities處理affinityThe affinity indicates which task an activity prefers to belong to.By default, all the activities from the same application have an affinity for each other.So, by default, all activities in the same application prefer to
我們可以通過ComponentName以及Intent的setComponent來實現:在一個應用程式裡面啟動另外一個已經安裝的應用程式或系統程式。下面是一個在一個應用程式裡面啟動另外一個已經安裝的程式,如下: [javascript]//組件名稱,第一個參數是應用程式的包名,後一個是這個應用程式的主Activity ComponentName com = new
Designing for Responsiveness為響應度而設計It's possible to write code that wins every performance test in the world, but still sends users in a fiery rage when they try to use the application.These are the applications that aren't responsive enough