I have a question about the android FileProvider. I want to save a pdf document and open it with a default program. I don´t want to save it in external Storage.
After I´
According to your FileProvider file(XML), the second parameter is com.example.myApp.myActivity. That is
com.example.myApp.myActivity
Uri uri = FileProvider.getUriForFile(getApplicationContext(), "com.example.myApp.myActivity", pdf);