由于我开发一个Android应用程序,我碰到启动安装在我的Android手机上了PrinterShare应用程序的需要。我想,当用户点击按钮
控制在我的应用程序,它应该启动的PrinterShare应用程序。当用户与他/她需要打印的文档做了,那么就应该回来家庭应用,从当它被推出。
任何想法,code段将AP preciated。 谢谢..: - )
解决方案最近,但幸运的是我得到的答案。 在这里,它是:
意向书我=新的意图(Intent.ACTION_VIEW);
i.setPackage(com.dynamixsoftware.printershare);
i.setDataAndType(printFileUri,text / plain的);
startActivity(ⅰ);
其中printFileUri如下:
static final的乌里printFileUri = Uri.parse(文件:///sdcard/Calci_print.txt);
如果任何人有另一种建议,其最欢迎..: - )
As I am developing an android app, I came across the need of launching the PrinterShare app installed on my android phone. I want that when user hits the Button
control in my app, it should launch the PrinterShare app. When user is done with the document which he/she needs to print, then it should come back to home application, from when it was launched.
Any idea, code snippet would be appreciated. Thanks.. :-)
解决方案Lately but fortunately I got the answer. Here it is:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setPackage("com.dynamixsoftware.printershare");
i.setDataAndType(printFileUri,"text/plain");
startActivity(i);
where 'printFileUri' is as follows:
static final Uri printFileUri = Uri.parse("file:///sdcard/Calci_print.txt");
If anyone has still another suggestion, its most welcomed.. :-)