Intent files

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Intent files

Postby TRDanny » Thu Jul 16, 2009 3:18 pm

Hello, I am trying to open a file with intents:

Intent myIntent = null;
File file = new File(
"C:\Documents and Settings\user\workspace\fileopen\assets\file.htm");
// The intent will open our anddev.org-board and search for the keyword clicked.
myIntent = new Intent("android.intent.action.VIEW",
Uri.fromFile(file));

// Start the activity
startActivity(myIntent);

But I am file process.com.fileopen has stopped unexpectedly error.

Suggestions? Thanks!
TRDanny
Freshman
Freshman
 
Posts: 7
Joined: Mon Jul 13, 2009 3:07 pm

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests