I'm trying to open a specific xlsx file in a specific location via some intent but I don't know how to do it.
I have tried to do something like that:
private void DrawNotfication() {
NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Intent intent=new Intent(Intent.ACTION_OPEN_DOCUMENT,Uri.fromFile(new File(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_DOWNLOADS), "file.xlsx")));
PendingIntent ped= PendingIntent.getActivity(this,0,intent,0);
Notification notification= new Notification.Builder(this).setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle("file download comlete")
.setContentIntent(ped).setWhen(System.currentTimeMillis())
.build();
mNotificationManager.notify(0,notification);
}
Someone can help me with the syntax?