I want to open a pdf file from the assets folder by clicking a button. Tried the below code but it's not working.
btn_help.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String uriPath = "file:///android_asset/Guide.pdf";
Uri uri = Uri.parse(uriPath);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "application/pdf");
startActivity(intent);
}
});