2012-02-06 47 views
5

我有普通的'電話'撥號器,並且我有新的'撥號器'應用程序。現在,如果我選中「此操作默認使用」,然後點擊「撥號程序」應用程序,則每當我按下電話按鈕時,「撥號程序」應用程序將自動啓動。但是我怎樣才能在代碼中改變它呢?以編程方式更改「此操作默認使用」

此首選項存儲在哪裏?

這是如何映射的?這是由一個android動作意圖字符串映射?

例如Intent.ACTION_CALL與一些應用程序,例如在「撥號」應用是將每次Intent.ACTION_CALL,復活開始的默認應用配對...

感謝

enter image description here

回答

0

使用的應用程序 你不能改變默認的應用程序,但你可以通過意向referr到一個應用程序的設置頁面的默認設置

Intent i = new Intent(android.provider.Settings.Aplications); 
startActivity(i); 

或像這樣

+0

致命異常:主 E/AndroidRuntime(3043):android.content.ActivityNotFoundException:無活動發現處理意圖{行爲= android.provider.Settings.Applications} 拋出 – Lukap 2012-02-06 10:56:31

+0

意圖i = new Intent(android.provider.Settings.ACTION_ALL_APPS); startActivity(i); – 2012-02-06 11:19:51

+0

找不到處理Intent的行爲{act = android.provider.Settings.ACTION_ALL_APPS} 我錯過了一些權限?你有沒有試過這個? – Lukap 2012-02-06 11:24:33

相關問題