1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
<!--
SPDX-FileCopyrightText: The WebKit GTK and WPE teams
SPDX-License-Identifier: BSD, LGPL-2.1
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>WPEWebKit – 2.0: Android Support</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8" />
<meta property="og:type" content="website"/>
<meta property="og:title" content="WPEWebKit: Android Support"/>
<meta property="og:description" content="Reference for WPEWebKit-2.0: Android Support"/>
<meta name="twitter:title" content="WPEWebKit: Android Support"/>
<meta name="twitter:description" content="Reference for WPEWebKit-2.0: Android Support"/>
<meta name="twitter:card" content="summary"/>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="wpe2-urlmap.js"></script>
<script src="fzy.js"></script>
<script src="search.js"></script>
<script src="main.js"></script>
</head>
<body>
<div id="body-wrapper" tabindex="-1">
<nav class="sidebar devhelp-hidden">
<div class="search section">
<form id="search-form" autocomplete="off">
<input id="search-input" type="text" name="do-not-autocomplete" placeholder="Click, or press 's' to search" autocomplete="off"/>
</form>
</div>
<div class="section namespace">
<h3><a href="index.html">WPEWebKit</a></h3>
<p>API Version: 2.0</p>
<p>Library Version: 2.50.5</p>
</div>
<div class="section generator">
<p>Generated by <a href="https://gitlab.gnome.org/GNOME/gi-docgen">gi-docgen</a> 2023.1</p>
</div>
</nav>
<button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button>
<section id="main" class="content">
<section>
<div class="docblock">
<p><span class="caps">WPE</span> WebKit supports running on <a href="https://www.android.com">Android</a>, which is
considerably different from other Linux-based systems.</p>
<h2 id="building">Building<a class="md-anchor" href="#building" title="Permanent link"></a></h2>
<p>Compiling <span class="caps">WPE</span> WebKit for Android requires a suitable toolchain configured
to use a “sysroot” which includes the needed dependencies—including
their development files.</p>
<p>Currently, the preferred method to build <span class="caps">WPE</span> WebKit for Android is using
<a href="https://github.com/Igalia/wpe-android-cerbero/">wpe-android-cerbero</a>. This is
a fork of the <a href="https://gitlab.freedesktop.org/gstreamer/cerbero/">Cerbero</a>
build system used to cross-compile the GStreamer multimedia libraries for a
number of targets—Android included—, with the needed changes to compile <span class="caps">WPE</span>
WebKit. Note that this produces the <em>native</em> libraries that are part of a
WebKit build, and their <em>native</em> dependencies.</p>
<h2 id="view-widget">View Widget<a class="md-anchor" href="#view-widget" title="Permanent link"></a></h2>
<p>A web view widget that integrates with the Android
<a href="https://developer.android.com/reference/android/view/View">View</a>-based <span class="caps">GUI</span>
toolkit and may be used as part of an application written in Java™ or Kotlin
is provided by the separate
<a href="https://github.com/Igalia/wpe-android"><span class="caps">WPE</span> Android</a> project.</p>
<p>Prebuilt packages produced by the <span class="caps">WPE</span> Android project are readily available
as
<a href="https://central.sonatype.com/artifact/org.wpewebkit.wpeview/wpeview">org.wpewebkit.wpeview</a>
at the <a href="https://central.sonatype.com/">Maven Central</a> repository. Using these
package is the recommended way of using <span class="caps">WPE</span> WebKit to develop Android
applications that embed <span class="caps">WPE</span> WebKit web views.</p>
<h2 id="logging">Logging<a class="md-anchor" href="#logging" title="Permanent link"></a></h2>
<p><span class="caps">WPE</span> WebKit integrates with the Android <code>logd</code> system service, and uses
the <code>WPEWebKit</code> tag. This means that logging is configured using system
properties, and <code>logcat</code> may be used to read log entries:</p>
<div class="codehilite"><pre><span></span><code>adb<span class="w"> </span>shell<span class="w"> </span>setprop<span class="w"> </span>log.tag.WPEWebKit<span class="w"> </span>VERBOSE
adb<span class="w"> </span>logcat<span class="w"> </span>-s<span class="w"> </span>WPEWebKit
</code></pre></div>
<p>The <code>WEBKIT_DEBUG</code> <a href="environment.html">environment variable</a> is replaced by the
<code>debug.log.WPEWebKit</code> system property to configure logging channels:</p>
<div class="codehilite"><pre><span></span><code>adb<span class="w"> </span>shell<span class="w"> </span>setprop<span class="w"> </span>debug.log.WPEWebKit<span class="w"> </span><span class="s1">'Process,Media=error'</span>
</code></pre></div>
<p>Using the <code>persist.</code> prefix may be added to system properties to store
settings across device reboots.</p>
</div>
</section>
</section>
<div id="toc" class="toc">
<nav aria-labelledby="toc-title">
<p id="toc-title">Content</p>
<ul class="toc-list">
<li class="toc-list-item"><a href="#building"><span class="link-text">Building</span></a></li>
<li class="toc-list-item"><a href="#view-widget"><span class="link-text">View Widget</span></a></li>
<li class="toc-list-item"><a href="#logging"><span class="link-text">Logging</span></a></li>
</ul>
</nav>
</div>
<section id="search" class="content hidden"></section>
<footer>
</footer>
</div>
</body>
</html>
|