【发布时间】:2016-05-22 06:27:29
【问题描述】:
我想通过 cc3000 连接 arduino 和 android,它在双方都能完美运行。 好吧,在 arduino 中,我们访问 http://ip/location1 和 http://ip/location2。
在android中我正在使用
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://ip/location1"));
startActivity(intent);
你知道我为什么不使用
HttpClient httpClient = new DefaultHttpClient();
HttpContext localContext = new BasicHttpContext();
HttpGet httpGet = new HttpGet("http://ip/location1");
HttpResponse response = httpClient.execute(httpGet, localContext);
它不工作,它甚至没有连接
那么,如何在不打开浏览器的情况下使其访问 url?带有 Intent.ACTION_VIEW
【问题讨论】:
-
在网页视图中调用它。
-
你想达到什么目的??
-
@Rohit5k2 我想访问 url 而不在浏览器中打开
标签: android url android-intent hyperlink arduino