intent

1.createChooser强制打开应用选择

Intent send = new Intent(Intent.ACTION_SEND);  
        send.setType("text/plain");  
        send.putExtra(Intent.EXTRA_TEXT, url);  
        send.putExtra(Intent.EXTRA_SUBJECT, title);    
        c.startActivity(Intent.createChooser(send, "share title"));

2.EXTRA_INITIAL_INTENTS组合多个intent打开选择

Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addCategory(Intent.CATEGORY_OPENABLE);
i.setType("image/*");
Intent i2 = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Intent chooserIntent = new Intent(Intent.ACTION_CHOOSER);
chooserIntent.putExtra(Intent.EXTRA_INTENT, i);
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{i2});
startActivity(chooserIntent);

3.指定和过滤应用
https://www.jianshu.com/p/9fd5363a9356

你可能感兴趣的:(intent)