packagemanager packagemanager = context.getpackagemanager();
string str1 = android.intent.category.default;
string str2 = android.intent.category.browsable;
string str3 = android.intent.action.view; //設定預設項的必須引數之一,使用者的操作符合
packagemanager packagemanager = context.getpackagemanager();
string str1 = "android.intent.category.default";
string str2 = "android.intent.category.browsable";
string str3 = "android.intent.action.view";
//設定預設項的必須引數之一,使用者的操作符合該過濾器時,預設設定起效
//設定瀏覽頁面用的activity
//找出手機當前安裝的所有瀏覽器程式
listresolveinfolist = packagemanager
.queryintentactivities(intent,
packagemanager.get_intent_filters);
int size = resolveinfolist.size();
componentname arrayofcomponentname = new componentname[size];
for (int i = 0; i < size; i++)
packagemanager.addpreferredactivity(filter,
intentfilter.match_category_scheme, arrayofcomponentname,
component);
啟動android預設瀏覽器
一 啟動android預設瀏覽器 intent intent new intent intent.setaction android.intent.action.view uri content url uri.parse intent.setdata content url startactivi...
啟動android預設瀏覽器
一 啟動android預設瀏覽器 intent intent new intent intent.setaction android.intent.action.view uri content url uri.parse intent.setdata content url startactivi...
android之啟用預設瀏覽器
一 啟動android預設瀏覽器 intent intent new intent intent.setaction android.intent.action.view uri content url uri.parse intent.setdata content url startactivi...