'Open pdf file in intent when click text view

I am creating a messaging app and I have to send a pdf file in it so when the pdf intent opens the user selects a pdf file and then I set a text view '''textview.setvisibility(View.VISIBLE):''' so when I click the text view i want to open the pdf file the user selects

Code

textview.setvisibility(View.GONE);
Intent intent = new Intent();
intent.setType(application/pdf);
startActivityForResult(intent, 28);
textview.setvisibility(View.VISIBLE);

Now I want to open the pdf in the device's installed pdf application when the user clicks the text view



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source