I want to open a new activity and pass it a URI of local html file(which is in the assets of the project):
public void onClick(View v) { Intent i = new Intent("com.appstudio.android.MY_ACTION",Uri.parse("file:///android_asset/sfaradi_mazon.html")); MainActivity.this.startActivity(i); } And this is how i declared the responding activity in the Manifest:
<activity android:name="BlessingActivity"> <intent-filter> <action android:name="com.appstudio.android.MY_ACTION"/> <data android:mimeType="text/html"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> But for some reason the app is crashing at startActivity(Action, Uri).
I'm getting an ActivityNotFoundException. No Activity was found to handle the intent
Any ideas?
Thanks!