I am trying to send the intention to the browser to open a local file. I want to use the default browser to open this file.
if(file.exists()){ Log.d(TAG, "file.exists"); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.fromFile(file)); context.startActivity(intent); }
But it leaves me and sets me free
08-10 13:27:58.993: ERROR/AndroidRuntime(28453): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file:///sdcard/release_notes.htm }
If I use the following browser, the browser opens google.com as expected
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://google.com"));
Also, when I write the url (file:///sdcard/release_notes.htm) to the address bar of the browser, it opens it as expected.
roose
source share