//使用chooserIntent private void startImplicitActivation() { Log.i(TAG, "Entered startImplicitActivation()"); // TODO - Create a base intent for viewing a URL // (HINT: second parameter uses Uri.parse()) Uri myUri = Uri.parse(URL); Intent baseIntent = new Intent(Intent.ACTION_VIEW, myUri); // TODO - Create a chooser intent, for choosing which Activity // will carry out the baseIntent // (HINT: Use the Intent class' createChooser() method) Intent chooserIntent = Intent.createChooser(baseIntent, "Display this url via .."); Log.i(TAG,"Chooser Intent Action:" + chooserIntent.getAction()); // TODO - Start the chooser Activity, using the chooser intent startActivity(chooserIntent); }
设置Intent-filter
1 56 7 8 9