WPS Office Mobile Phone Edition calling interface code one of the guide posts (Android)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.