Often there are some children who like to develop tinker shoes ask us, WPS Office Mobile version provides a calling interface, want to use a call command in Android, directly
Call the WPS Mobile version to open the specified doc file without popping up an optional list of programs (if the user has multiple document viewing software), the user chooses to use
Which program opens Doc. Want to omit the process of selecting a program, directly call the mobile version of WPS Open.
Bonnie to provide you with relevant examples, hoping to help those interested in the development of students to solve this problem.
The following is a code example that specifies that the document be opened using the WPS Chinese version (WPS differs slightly from the language version of the package, please note the Red Mark section):
Intent Intent = new Intent ();
Intent.addflags (Intent.flag_activity_new_task);
Intent.setaction (Android.content.Intent.ACTION_VIEW);
Intent.setclassname ("Cn.wps.moffice", "cn.wps.moffice.documentmanager.PreStartActivity");
Uri uri = uri.fromfile (New File ("/mnt/sdcard/document. doc"));
Intent.setdata (URI);
Try
{
StartActivity (Intent);
}
catch (Activitynotfoundexception e)
{
E.printstacktrace ();
}
The above code has been tested, please rest assured that you get what fun things, don't forget to share with Bonnie Oh ~
Http://bbs.wps.cn/thread-22327642-1-1.html
WPS Office Mobile Phone Edition calling interface code one of the guide posts (Android)