Android Tutorials - Herong's Tutorial Examples - v3.05, by Herong Yang
AndroidWeb - My Own Web Browser
This section provides a tutorial example on how to make my own Web browser, AndroidWeb, to work. The INTERNET permission needs to added to the Android project manifest file.
To figure out what's wrong with my AndroidView 1.0, I looked at the log entries with the "adb logcat" command. Nothing is related to this error.
I went back to the Android SDK document, and found this information: Because this application needs access to the Internet, you need to add the appropriate permissions to the Android manifest file. Open the AndroidManifest.xml file and add the following as a child of the <manifest> element: <uses-permission android:name="android.permission.INTERNET" />
Okay. I modified the \herong\AndroidWeb\AndroidManifest.xml file to include the INTERNET permission line:
<?xml version="1.0" encoding="utf-8"?> <!-- AndroidWeb_AndroidManifest.xml - Version 2.0 - Adding INTERNET permission - Copyright (c) 2015, HerongYang.com, All Rights Reserved. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.herongyang.web" android:versionCode="1" android:versionName="1.0"> <application android:label="@string/app_name" android:icon="@drawable/ic_launcher"> <activity android:name="AndroidWeb" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.INTERNET" /> </manifest>
Rebuild the debug package, reinstall it to the emulator and run it. Google search home page is displayed!
Table of Contents
Installing JDK 1.8 on Windows System
Installation of Android SDK R24 and Emulator
Installing Apache Ant 1.9 on Windows System
Developing First Android Application - HelloAndroid
Android Application Package (APK) Files
Android Debug Bridge (adb) Tool
AboutAndroid - Application to Retrieve System Information
android.app.Activity Class and Activity Lifecycle
View Objects and Layout Resource Files
Using "adb logcat" Command for Debugging
Build Process and Package File Content
►Building Your Own Web Browser
android.webkit.WebView - Web Browser Base Class
►AndroidWeb - My Own Web Browser
WebViewClient Subclass - Content Rendering Callbacks
saveWebArchive() Method - Saving Web Archive Files
Web Archive File - XML File of Base64 Encoded Data
Samsung Galaxy Tab 3 Mini Tablet
USB Debugging Applications on Samsung Tablet
USB Debugging Applications on LG-V905R Tablet