简体   繁体   English

从Cordova插件打开其他应用程序失败

[英]Opening other app from cordova plugin fails

I want to open the Play Books app from my Cordova application using a book's web reader url. 我想使用书籍的网络阅读器网址从我的Cordova应用程序中打开Play图书应用程序。 This code worked fine until recently: 这段代码直到最近都工作良好:

    Intent i = new Intent();
    i.setAction(android.content.Intent.ACTION_VIEW);
    i.setComponent(new ComponentName("com.google.android.apps.books", "com.google.android.apps.books.app.ReadingActivity"));
    i.setData(Uri.parse(url));
    this.cordova.getActivity().startActivity(i);

Now I receive this error: 现在,我收到此错误:

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.apps.books/com.google.android.apps.books.app.ReadingActivity}; android.content.ActivityNotFoundException:无法找到显式的活动类{com.google.android.apps.books / com.google.android.apps.books.app.ReadingActivity}; have you declared this activity in your AndroidManifest.xml? 您是否在AndroidManifest.xml中声明了此活动?

AFAIK I dont have to declare activities from other apps that I want to call. AFAIK我不必从我要调用的其他应用程序中声明活动。 Am I right? 我对吗?

Is there any Android or other update released recently that could have caused this error? 最近有没有发布任何可能导致此错误的Android或其他更新?

The name of the activity has been changed to com.google.android.apps. 活动名称已更改为com.google.android.apps。 play .books.app.ReadingActivity. 播放 .books.app.ReadingActivity。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM