简体   繁体   English

如何在Android中使用Uri.parse

[英]How to use Uri.parse in android

Hi I'm testing on encryption & decryption of a web url & trying to develop intent to web browser. 嗨,我正在测试Web网址的加密和解密,并尝试开发Web浏览器的意图。

String decrypted = DecodeAES.decrypt(AESkey, encrypted);
decryptedValue.setText(decrypted);

here i want to retrieve "decryptedValue" and to be placed in the Uri.parse actually here the "decryptedValue" contains some website to be opened in webbrowser. 在这里,我想检索“ decryptedValue”并将其放置在Uri.parse中,实际上,“ decryptedValue”包含一些要在webbrowser中打开的网站。

Intent browserIntent = new Intent(Intent.ACTION_VIEW,Uri.parse("http://www.google.com"));
startActivity(browserIntent);

Please tell me how to use Uri.parse & what to be used. 请告诉我如何使用Uri.parse和要使用的内容。

Thanks in advance. 提前致谢。

Change - 变更-

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("www.google.com"));

to - 至 -

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));

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

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