Reputation: 2057
My application is trying to open a text file, and is presented with a list of apps that are able to open the text file, for eg (HTMLViewer, OpenOffice, etc). I want my application to open text file via OpenOffice automatically, without the list dialog popping out. Is there any ways to do that programmatically?
NOTE: This question is assuming that the user has the necessary applications installed and the applications mentioned in this question only serve as examples.
Upvotes: 1
Views: 1367
Reputation: 33792
What you are looking for is setPackage()
Set an explicit application package name that limits the components this Intent will resolve to. If left to the default value of null, all components in all applications will considered. If non-null, the Intent can only match the components in the given application package.
Upvotes: 2