Android 앱에서 웹 페이지를 열 때 WebView를 사용하고 있습니다. 안드로이드 매니페스트 파일에브라우저를 사용하여 웹 페이지를 엽니 다.
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
추가 권한을 : 나는대로 레이아웃을 설명
<uses-permission android:name="android.permission.INTERNET" />
그리고 나의 활동 클래스에서 웹보기를 사용 :
WebView theWebPage = new WebView(this);
setContentView(theWebPage);
theWebPage.loadUrl("http://www.google.com");
그 일을하는 데, 나는 몇 안드로이드 폰에서이 앱을 돌렸다. 개봉 후 앱에서 웹 페이지를 여는 데 사용할 Chrome, Mozilla 또는 기타 브라우저가 설치된 브라우저 (예 : "
http://www.google.com")를 묻습니다.
앱이 웹 페이지 자체를 열길 원합니다. 도움?
여기 봐 : http://stackoverflow.com/questions/7746409/android-webview-launches-browser- when-calling-loadurl –