blob: 487949c54d9d758cfb9c1dda2b657259a2008b49 [file] [log] [blame]
<!DOCTYPE html>
<html devsite>
<head>
<meta name="top_category" value="develop" />
<meta name="subcategory" value="reference" />
<meta name="book_path" value="/reference/android/support/wearable/_book.yaml" />
<title>WatchFaceService.Engine</title>
</head>
<body class="gc-documentation develop reference api apilevel-">
<div id="doc-api-level" class="" style="display:none"></div>
<div id="naMessage"></div>
<div id="api-info-block">
<div class="api-level">
</div>
<div class="sum-details-links">
Summary:
<a href="#pubctors">Ctors</a>
&#124; <a href="#pubmethods">Methods</a>
&#124; <a href="#inhmethods">Inherited Methods</a>
&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
</div><!-- end sum-details-links -->
</div><!-- end api-info-block -->
<div class="api apilevel-" id="jd-content">
<!-- ======== START OF CLASS DATA ======== -->
<h1 class="api-title">WatchFaceService.Engine</h1>
<p>
<code class="api-signature">
public
abstract
class
WatchFaceService.Engine
</code>
<br>
<code class="api-signature">
</code>
<code class="api-signature">
extends WallpaperService.Engine
</code>
<code class="api-signature">
</code>
</p><table class="jd-inheritance-table">
<tr>
<td colspan="3" class="jd-inheritance-class-cell">java.lang.Object
</td>
</tr>
<tr>
<td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
<td colspan="2" class="jd-inheritance-class-cell">android.service.wallpaper.WallpaperService.Engine
</td>
</tr>
<tr>
<td class="jd-inheritance-space">&nbsp;</td>
<td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
<td colspan="1" class="jd-inheritance-class-cell">android.support.wearable.watchface.WatchFaceService.Engine
</td>
</tr>
</table>
<table class="jd-sumtable jd-sumtable-subclasses">
<tr><td style="border:none;margin:0;padding:0;">
<a href="#" onclick="return toggleInherited(this, null)" id="subclasses-direct" class="jd-expando-trigger closed"
><img height="34" id="subclasses-direct-trigger"
src="/assets/images/styles/disclosure_down.png"
class="jd-expando-trigger-img" /></a>Known Direct Subclasses
<div id="subclasses-direct">
<div id="subclasses-direct-list"
class="jd-inheritedlinks"
>
<a href="/reference/android/support/wearable/watchface/CanvasWatchFaceService.Engine.html">CanvasWatchFaceService.Engine</a>,
<a href="/reference/android/support/wearable/watchface/Gles2WatchFaceService.Engine.html">Gles2WatchFaceService.Engine</a>
</div>
<div id="subclasses-direct-summary"
style="display: none;"
>
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-" >
<td class="jd-linkcol"><a href="/reference/android/support/wearable/watchface/CanvasWatchFaceService.Engine.html">CanvasWatchFaceService.Engine</a></td>
<td class="jd-descrcol" width="100%">
The actual implementation of a watch face that draws on a <code><a href="/reference/android/graphics/Canvas.html">Canvas</a></code>.&nbsp;
</td>
</tr>
<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="/reference/android/support/wearable/watchface/Gles2WatchFaceService.Engine.html">Gles2WatchFaceService.Engine</a></td>
<td class="jd-descrcol" width="100%">
The actual implementation of a watch face that draws using OpenGL ES 2.0.&nbsp;
</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
<br><hr>
<p>The actual implementation of a watch face. You must implement
<code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#onCreateEngine()">onCreateEngine()</a></code> to return your concrete Engine implementation.
</p>
<h2 class="api-section">Summary</h2>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<table id="pubctors" class="responsive constructors">
<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
<tr class="api apilevel-" >
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#WatchFaceService.Engine()">WatchFaceService.Engine</a>()
</code>
</td>
</tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="pubmethods" class="responsive methods">
<tr><th colspan="2"><h3>Public methods</h3></th></tr>
<tr class="api apilevel-" >
<td><code>
final
int</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#getInterruptionFilter()">getInterruptionFilter</a>()
</code>
<p>Returns interruption filter selected by the user.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
int</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#getNotificationCount()">getNotificationCount</a>()
</code>
<p>Returns the total number of notification cards in the stream.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
Rect</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#getPeekCardPosition()">getPeekCardPosition</a>()
</code>
<p>Returns the location of the first peeking card.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
int</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#getUnreadCount()">getUnreadCount</a>()
</code>
<p>Returns the number of unread notification cards in the stream.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
boolean</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#isInAmbientMode()">isInAmbientMode</a>()
</code>
<p>Returns whether the watch face is in ambient mode.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onAmbientModeChanged(boolean)">onAmbientModeChanged</a>(boolean inAmbientMode)
</code>
<p>Called when the device enters or exits ambient mode.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
Bundle</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean)">onCommand</a>(String action, int x, int y, int z, Bundle extras, boolean resultRequested)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onCreate(android.view.SurfaceHolder)">onCreate</a>(SurfaceHolder holder)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onDestroy()">onDestroy</a>()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onInterruptionFilterChanged(int)">onInterruptionFilterChanged</a>(int interruptionFilter)
</code>
<p>Called when the user changes interruption filter.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onNotificationCountChanged(int)">onNotificationCountChanged</a>(int count)
</code>
<p>Called when the total number of notification cards in the stream has changed.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onPeekCardPositionUpdate(android.graphics.Rect)">onPeekCardPositionUpdate</a>(Rect rect)
</code>
<p>Called when the first, peeking card positions itself on the screen.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onPropertiesChanged(android.os.Bundle)">onPropertiesChanged</a>(Bundle properties)
</code>
<p>Called when the properties of the device are determined.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTapCommand(int, int, int, long)">onTapCommand</a>(int tapType, int x, int y, long eventTime)
</code>
<p>Called when a tap or touch related event occurs.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTimeTick()">onTimeTick</a>()
</code>
<p>Called periodically to update the time shown by the watch face.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onUnreadCountChanged(int)">onUnreadCountChanged</a>(int count)
</code>
<p>Called when the number of unread notification cards in the stream has changed.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onVisibilityChanged(boolean)">onVisibilityChanged</a>(boolean visible)
</code>
<p>Called to inform you of the watch face becoming visible or hidden.
</p>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
<a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#setWatchFaceStyle(android.support.wearable.watchface.WatchFaceStyle)">setWatchFaceStyle</a>(<a href="/reference/android/support/wearable/watchface/WatchFaceStyle.html">WatchFaceStyle</a> watchFaceStyle)
</code>
<p>Sets the watch face style.
</p>
</td>
</tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="inhmethods" class="methods inhtable">
<tr><th><h3>Inherited methods</h3></th></tr>
<tr class="api apilevel-" >
<td colspan="2">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.service.wallpaper.WallpaperService.Engine" class="jd-expando-trigger closed"
><img height="34" id="inherited-methods-android.service.wallpaper.WallpaperService.Engine-trigger"
src="/assets/images/styles/disclosure_down.png"
class="jd-expando-trigger-img" /></a>From
class
<code>
android.service.wallpaper.WallpaperService.Engine
</code>
<div id="inherited-methods-android.service.wallpaper.WallpaperService.Engine">
<div id="inherited-methods-android.service.wallpaper.WallpaperService.Engine-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.service.wallpaper.WallpaperService.Engine-summary" style="display: none;">
<table class="jd-sumtable-expando responsive">
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
int</code>
</td>
<td width="100%">
<code>
getDesiredMinimumHeight()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
int</code>
</td>
<td width="100%">
<code>
getDesiredMinimumWidth()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
SurfaceHolder</code>
</td>
<td width="100%">
<code>
getSurfaceHolder()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
boolean</code>
</td>
<td width="100%">
<code>
isPreview()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
boolean</code>
</td>
<td width="100%">
<code>
isVisible()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onApplyWindowInsets(WindowInsets arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
Bundle</code>
</td>
<td width="100%">
<code>
onCommand(String arg0, int arg1, int arg2, int arg3, Bundle arg4, boolean arg5)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onCreate(SurfaceHolder arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onDesiredSizeChanged(int arg0, int arg1)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onDestroy()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onOffsetsChanged(float arg0, float arg1, float arg2, float arg3, int arg4, int arg5)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onSurfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onSurfaceCreated(SurfaceHolder arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onSurfaceDestroyed(SurfaceHolder arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onSurfaceRedrawNeeded(SurfaceHolder arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onTouchEvent(MotionEvent arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
onVisibilityChanged(boolean arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
setFixedSizeAllowed(boolean arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
setOffsetNotificationsEnabled(boolean arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
setTouchEventsEnabled(boolean arg0)
</code>
</td>
</tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="2">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img height="34" id="inherited-methods-java.lang.Object-trigger"
src="/assets/images/styles/disclosure_down.png"
class="jd-expando-trigger-img" /></a>From
class
<code>
java.lang.Object
</code>
<div id="inherited-methods-java.lang.Object">
<div id="inherited-methods-java.lang.Object-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando responsive">
<tr class="api apilevel-" >
<td><code>
Object</code>
</td>
<td width="100%">
<code>
clone()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
boolean</code>
</td>
<td width="100%">
<code>
equals(Object arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
void</code>
</td>
<td width="100%">
<code>
finalize()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
Class&lt;?&gt;</code>
</td>
<td width="100%">
<code>
getClass()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
int</code>
</td>
<td width="100%">
<code>
hashCode()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
void</code>
</td>
<td width="100%">
<code>
notify()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
void</code>
</td>
<td width="100%">
<code>
notifyAll()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
String</code>
</td>
<td width="100%">
<code>
toString()
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
void</code>
</td>
<td width="100%">
<code>
wait(long arg0, int arg1)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
void</code>
</td>
<td width="100%">
<code>
wait(long arg0)
</code>
</td>
</tr>
<tr class="api apilevel-" >
<td><code>
final
void</code>
</td>
<td width="100%">
<code>
wait()
</code>
</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
<!-- XML Attributes -->
<!-- Enum Values -->
<!-- Constants -->
<!-- Fields -->
<!-- Public ctors -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<h2 class="api-section">Public constructors</h2>
<A NAME="WatchFaceService.Engine()"></A>
<div class="api apilevel-">
<h3 class="api-name">WatchFaceService.Engine</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
WatchFaceService.Engine ()</pre>
<p></p>
</div>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->
<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->
<h2 class="api-section">Public methods</h2>
<A NAME="getInterruptionFilter()"></A>
<div class="api apilevel-">
<h3 class="api-name">getInterruptionFilter</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
int getInterruptionFilter ()</pre>
<p>Returns interruption filter selected by the user.</p>
<table class="responsive">
<tr><th colspan=2>Returns</th></tr>
<tr>
<td><code>int</code></td>
<td width="100%"><code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_NONE">INTERRUPTION_FILTER_NONE</a></code>, <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_PRIORITY">INTERRUPTION_FILTER_PRIORITY</a></code>,
<code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_ALL">INTERRUPTION_FILTER_ALL</a></code>, <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_ALARMS">INTERRUPTION_FILTER_ALARMS</a></code>,
or <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_UNKNOWN">INTERRUPTION_FILTER_UNKNOWN</a></code>.
</td>
</tr>
</table>
</div>
<A NAME="getNotificationCount()"></A>
<div class="api apilevel-">
<h3 class="api-name">getNotificationCount</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
int getNotificationCount ()</pre>
<p>Returns the total number of notification cards in the stream.
</p>
<table class="responsive">
<tr><th colspan=2>Returns</th></tr>
<tr>
<td><code>int</code></td>
<td width="100%"><!-- no returns description in source --></td>
</tr>
</table>
</div>
<A NAME="getPeekCardPosition()"></A>
<div class="api apilevel-">
<h3 class="api-name">getPeekCardPosition</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
Rect getPeekCardPosition ()</pre>
<p>Returns the location of the first peeking card. This doesn't provide information about
all movements of the card, only about its location when it's peeking at the bottom and
allowing the watch face to be exposed.
</p>
<table class="responsive">
<tr><th colspan=2>Returns</th></tr>
<tr>
<td><code>Rect</code></td>
<td width="100%"><!-- no returns description in source --></td>
</tr>
</table>
</div>
<A NAME="getUnreadCount()"></A>
<div class="api apilevel-">
<h3 class="api-name">getUnreadCount</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
int getUnreadCount ()</pre>
<p>Returns the number of unread notification cards in the stream.
</p>
<table class="responsive">
<tr><th colspan=2>Returns</th></tr>
<tr>
<td><code>int</code></td>
<td width="100%"><!-- no returns description in source --></td>
</tr>
</table>
</div>
<A NAME="isInAmbientMode()"></A>
<div class="api apilevel-">
<h3 class="api-name">isInAmbientMode</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
boolean isInAmbientMode ()</pre>
<p>Returns whether the watch face is in ambient mode. When true, the watch face should
display in white on black.
</p>
<table class="responsive">
<tr><th colspan=2>Returns</th></tr>
<tr>
<td><code>boolean</code></td>
<td width="100%"><!-- no returns description in source --></td>
</tr>
</table>
</div>
<A NAME="onAmbientModeChanged(boolean)"></A>
<div class="api apilevel-">
<h3 class="api-name">onAmbientModeChanged</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onAmbientModeChanged (boolean inAmbientMode)</pre>
<p>Called when the device enters or exits ambient mode. The watch face should switch to a
black and white display in ambient mode. If the watch face displays seconds, it should
hide them in ambient mode.
</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>inAmbientMode</code></td>
<td width="100%">
<code>boolean</code>
<!-- no parameter comment --></td>
</tr>
</table>
</div>
<A NAME="onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean)"></A>
<div class="api apilevel-">
<h3 class="api-name">onCommand</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
Bundle onCommand (String action,
int x,
int y,
int z,
Bundle extras,
boolean resultRequested)</pre>
<p></p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>action</code></td>
<td width="100%">
<code>String</code>
<!-- no parameter comment --></td>
</tr>
<tr>
<td><code>x</code></td>
<td width="100%">
<code>int</code>
<!-- no parameter comment --></td>
</tr>
<tr>
<td><code>y</code></td>
<td width="100%">
<code>int</code>
<!-- no parameter comment --></td>
</tr>
<tr>
<td><code>z</code></td>
<td width="100%">
<code>int</code>
<!-- no parameter comment --></td>
</tr>
<tr>
<td><code>extras</code></td>
<td width="100%">
<code>Bundle</code>
<!-- no parameter comment --></td>
</tr>
<tr>
<td><code>resultRequested</code></td>
<td width="100%">
<code>boolean</code>
<!-- no parameter comment --></td>
</tr>
</table>
<table class="responsive">
<tr><th colspan=2>Returns</th></tr>
<tr>
<td><code>Bundle</code></td>
<td width="100%"><!-- no returns description in source --></td>
</tr>
</table>
</div>
<A NAME="onCreate(android.view.SurfaceHolder)"></A>
<div class="api apilevel-">
<h3 class="api-name">onCreate</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onCreate (SurfaceHolder holder)</pre>
<p></p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>holder</code></td>
<td width="100%">
<code>SurfaceHolder</code>
<!-- no parameter comment --></td>
</tr>
</table>
</div>
<A NAME="onDestroy()"></A>
<div class="api apilevel-">
<h3 class="api-name">onDestroy</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onDestroy ()</pre>
<p></p>
</div>
<A NAME="onInterruptionFilterChanged(int)"></A>
<div class="api apilevel-">
<h3 class="api-name">onInterruptionFilterChanged</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onInterruptionFilterChanged (int interruptionFilter)</pre>
<p>Called when the user changes interruption filter. The watch face should adjust the
amount of information it displays. For example, if it displays the
number of pending emails, it should hide it if interruptionFilter is equal to <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_NONE">INTERRUPTION_FILTER_NONE</a></code>. <code>interruptionFilter</code> can be
<code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_NONE">INTERRUPTION_FILTER_NONE</a></code>, <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_PRIORITY">INTERRUPTION_FILTER_PRIORITY</a></code>,
<code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_ALL">INTERRUPTION_FILTER_ALL</a></code>, <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_ALARMS">INTERRUPTION_FILTER_ALARMS</a></code>,
or <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#INTERRUPTION_FILTER_UNKNOWN">INTERRUPTION_FILTER_UNKNOWN</a></code>.
</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>interruptionFilter</code></td>
<td width="100%">
<code>int</code>
<!-- no parameter comment --></td>
</tr>
</table>
</div>
<A NAME="onNotificationCountChanged(int)"></A>
<div class="api apilevel-">
<h3 class="api-name">onNotificationCountChanged</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onNotificationCountChanged (int count)</pre>
<p>Called when the total number of notification cards in the stream has changed.</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>count</code></td>
<td width="100%">
<code>int</code>:
total number of the notification cards in the stream
</td>
</tr>
</table>
</div>
<A NAME="onPeekCardPositionUpdate(android.graphics.Rect)"></A>
<div class="api apilevel-">
<h3 class="api-name">onPeekCardPositionUpdate</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onPeekCardPositionUpdate (Rect rect)</pre>
<p>Called when the first, peeking card positions itself on the screen. This is where the
watch face can change its appearance depending on where the card is on the screen. This
doesn't provide information about all movements of the card, only about its location when
it's peeking at the bottom and allowing the watch face to be exposed.
</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>rect</code></td>
<td width="100%">
<code>Rect</code>
<!-- no parameter comment --></td>
</tr>
</table>
</div>
<A NAME="onPropertiesChanged(android.os.Bundle)"></A>
<div class="api apilevel-">
<h3 class="api-name">onPropertiesChanged</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onPropertiesChanged (Bundle properties)</pre>
<p>Called when the properties of the device are determined. These include
<code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#PROPERTY_BURN_IN_PROTECTION">PROPERTY_BURN_IN_PROTECTION</a></code> and <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.html#PROPERTY_LOW_BIT_AMBIENT">PROPERTY_LOW_BIT_AMBIENT</a></code>.</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>properties</code></td>
<td width="100%">
<code>Bundle</code>:
a bundle containing the hardware properties
</td>
</tr>
</table>
</div>
<A NAME="onTapCommand(int, int, int, long)"></A>
<div class="api apilevel-">
<h3 class="api-name">onTapCommand</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onTapCommand (int tapType,
int x,
int y,
long eventTime)</pre>
<p>Called when a tap or touch related event occurs.</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>tapType</code></td>
<td width="100%">
<code>int</code>:
Value representing the event sent to the wallpaper.</td>
</tr>
<tr>
<td><code>x</code></td>
<td width="100%">
<code>int</code>:
X coordinate of the event.</td>
</tr>
<tr>
<td><code>y</code></td>
<td width="100%">
<code>int</code>:
Y coordinate of the event.</td>
</tr>
<tr>
<td><code>eventTime</code></td>
<td width="100%">
<code>long</code>:
The time, in millis, of the event.
</td>
</tr>
</table>
</div>
<A NAME="onTimeTick()"></A>
<div class="api apilevel-">
<h3 class="api-name">onTimeTick</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onTimeTick ()</pre>
<p>Called periodically to update the time shown by the watch face. This method is
called:<ul>
<li>at least once per minute in both ambient and interactive modes</li>
<li>when date or time has changed</li>
<li>when timezone has changed</li>
</ul>
</p>
</div>
<A NAME="onUnreadCountChanged(int)"></A>
<div class="api apilevel-">
<h3 class="api-name">onUnreadCountChanged</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onUnreadCountChanged (int count)</pre>
<p>Called when the number of unread notification cards in the stream has changed.</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>count</code></td>
<td width="100%">
<code>int</code>:
number of the notification cards in the stream that haven't yet been seen by
the user
</td>
</tr>
</table>
</div>
<A NAME="onVisibilityChanged(boolean)"></A>
<div class="api apilevel-">
<h3 class="api-name">onVisibilityChanged</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void onVisibilityChanged (boolean visible)</pre>
<p>Called to inform you of the watch face becoming visible or hidden. If you decide to
override this method, you <em>must</em> call <code>super.onVisibilityChanged(visible)</code>
as the first statement in your override.
</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>visible</code></td>
<td width="100%">
<code>boolean</code>
<!-- no parameter comment --></td>
</tr>
</table>
</div>
<A NAME="setWatchFaceStyle(android.support.wearable.watchface.WatchFaceStyle)"></A>
<div class="api apilevel-">
<h3 class="api-name">setWatchFaceStyle</h3>
<div class="api-level">
<div></div>
</div>
<pre class="api-signature no-pretty-print">
void setWatchFaceStyle (<a href="/reference/android/support/wearable/watchface/WatchFaceStyle.html">WatchFaceStyle</a> watchFaceStyle)</pre>
<p>Sets the watch face style. This affects how UI elements such as the battery indicator are
drawn on top of the watch face. Typically called in <code><a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onCreate(android.view.SurfaceHolder)">onCreate(SurfaceHolder)</a></code> but may be called
at any time, e.g. in response to the user changing the watch face configuration. Must be
called from the wallpaper thread.
</p>
<table class="responsive">
<tr><th colspan=2>Parameters</th></tr>
<tr>
<td><code>watchFaceStyle</code></td>
<td width="100%">
<code>WatchFaceStyle</code>
<!-- no parameter comment --></td>
</tr>
</table>
</div>
<!-- ========= METHOD DETAIL ======== -->
<!-- ========= END OF CLASS DATA ========= -->
</div><!-- end jd-content -->
<div class="data-reference-resources-wrapper">
<ul data-reference-resources>
<li><h2>Annotations</h2>
<ul>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li>
</ul>
</li>
<li><h2>Classes</h2>
<ul>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/CanvasWatchFaceService.html">CanvasWatchFaceService</a></li>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/CanvasWatchFaceService.Engine.html">CanvasWatchFaceService.Engine</a></li>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/Gles2WatchFaceService.html">Gles2WatchFaceService</a></li>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/Gles2WatchFaceService.Engine.html">Gles2WatchFaceService.Engine</a></li>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/WatchFaceService.html">WatchFaceService</a></li>
<li class="selected api apilevel-"><a href="/reference/android/support/wearable/watchface/WatchFaceService.Engine.html">WatchFaceService.Engine</a></li>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/WatchFaceStyle.html">WatchFaceStyle</a></li>
<li class="api apilevel-"><a href="/reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html">WatchFaceStyle.Builder</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>