按钮点击事件可在Google Chrome中打开书签

时间:2016-02-14 15:20:18

标签: java android android-studio

我制作的应用程序允许用户在onClick活动中访问Google Chrome中的书签。我尝试过以下操作,但在runtime事件

上收到onClick错误

我的代码如下

public void onClickbtnSavedArticles(View view) {
    Uri uri = Uri.parse("chrome://bookmarks/"); // missing 'http://' will cause crashed
    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
    startActivity(intent);
}

出于某种原因,它似乎没有找到chrome://bookmarks/作为网址。 关于如何解决这个问题的任何想法?

0 个答案:

没有答案
相关问题