Skip to content

Commit b00423d

Browse files
committed
Deploy website
Deploy website version based on 5b279f55f3ece2f01bdcb7ab301a1280573dadcf
1 parent a1ecbca commit b00423d

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

docs/getting-started/setup.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,19 @@ <h2><a class="anchor" aria-hidden="true" id="android"></a><a href="#android" ari
140140
<span class="hljs-function"><span class="hljs-keyword">protected</span> <span class="hljs-keyword">void</span> <span class="hljs-title">onCreate</span><span class="hljs-params">(@Nullable Bundle savedInstanceState)</span> </span>{
141141
<span class="hljs-keyword">super</span>.onCreate(savedInstanceState);
142142

143-
<span class="hljs-comment">// lazy load Google Cast context</span>
144-
CastContext.getSharedInstance(<span class="hljs-keyword">this</span>);
143+
<span class="hljs-keyword">try</span> {
144+
<span class="hljs-comment">// lazy load Google Cast context</span>
145+
CastContext.getSharedInstance(<span class="hljs-keyword">this</span>);
146+
} <span class="hljs-keyword">catch</span> (Exception e) {
147+
<span class="hljs-comment">// cast framework not supported</span>
148+
}
145149
}
146150
}
147151
</code></pre>
148-
<p>This works if you're extending <code>ReactActivity</code> (or <code>NavigationActivity</code> if you're using react-native-navigation). If you're extending a different activity, make sure it is a descendant of <code>androidx.appcompat.app.AppCompatActivity</code>.</p></li>
152+
<p>This works if you're extending <code>ReactActivity</code> (or <code>NavigationActivity</code> if you're using react-native-navigation). If you're extending a different activity, make sure it is a descendant of <code>androidx.appcompat.app.AppCompatActivity</code>.</p>
153+
<blockquote>
154+
<p>The Cast framework requires Google Play Services to be available on your device. If your device doesn't have them by default, you can install them either from the <a href="(https://play.google.com/store/apps/details?id=com.google.android.gms&amp;hl=en_US&amp;gl=US)">Play Store</a>, from <a href="http://opengapps.org/">OpenGApps</a> or follow tutorials online.</p>
155+
</blockquote></li>
149156
</ol>
150157
<h2><a class="anchor" aria-hidden="true" id="chrome"></a><a href="#chrome" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Chrome</h2>
151158
<p>Not supported yet</p>

docs/getting-started/setup/index.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,19 @@ <h2><a class="anchor" aria-hidden="true" id="android"></a><a href="#android" ari
140140
<span class="hljs-function"><span class="hljs-keyword">protected</span> <span class="hljs-keyword">void</span> <span class="hljs-title">onCreate</span><span class="hljs-params">(@Nullable Bundle savedInstanceState)</span> </span>{
141141
<span class="hljs-keyword">super</span>.onCreate(savedInstanceState);
142142

143-
<span class="hljs-comment">// lazy load Google Cast context</span>
144-
CastContext.getSharedInstance(<span class="hljs-keyword">this</span>);
143+
<span class="hljs-keyword">try</span> {
144+
<span class="hljs-comment">// lazy load Google Cast context</span>
145+
CastContext.getSharedInstance(<span class="hljs-keyword">this</span>);
146+
} <span class="hljs-keyword">catch</span> (Exception e) {
147+
<span class="hljs-comment">// cast framework not supported</span>
148+
}
145149
}
146150
}
147151
</code></pre>
148-
<p>This works if you're extending <code>ReactActivity</code> (or <code>NavigationActivity</code> if you're using react-native-navigation). If you're extending a different activity, make sure it is a descendant of <code>androidx.appcompat.app.AppCompatActivity</code>.</p></li>
152+
<p>This works if you're extending <code>ReactActivity</code> (or <code>NavigationActivity</code> if you're using react-native-navigation). If you're extending a different activity, make sure it is a descendant of <code>androidx.appcompat.app.AppCompatActivity</code>.</p>
153+
<blockquote>
154+
<p>The Cast framework requires Google Play Services to be available on your device. If your device doesn't have them by default, you can install them either from the <a href="(https://play.google.com/store/apps/details?id=com.google.android.gms&amp;hl=en_US&amp;gl=US)">Play Store</a>, from <a href="http://opengapps.org/">OpenGApps</a> or follow tutorials online.</p>
155+
</blockquote></li>
149156
</ol>
150157
<h2><a class="anchor" aria-hidden="true" id="chrome"></a><a href="#chrome" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Chrome</h2>
151158
<p>Not supported yet</p>

docs/getting-started/troubleshooting.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ <h2><a class="anchor" aria-hidden="true" id="other-issues"></a><a href="#other-i
7777
<ul>
7878
<li><pre><code class="hljs">com.google.android.gms.dynamite.DynamiteModule$zza: <span class="hljs-keyword">No</span> acceptable module <span class="hljs-built_in">found</span>. <span class="hljs-keyword">Local</span> <span class="hljs-keyword">version</span> <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> remote <span class="hljs-keyword">version</span> <span class="hljs-keyword">is</span> <span class="hljs-number">0.</span>
7979
</code></pre>
80-
<p>You don't have Google Play Services available on your device. Make sure to install them either from the <a href="(https://play.google.com/store/apps/details?id=com.google.android.gms&amp;hl=en_US&amp;gl=US)">Play Store</a>, from <a href="http://opengapps.org/">OpenGApps</a> or follow tutorials online.</p>
81-
<p>TODO: Handle gracefully and ignore the Cast library without crashing.</p></li>
80+
<p>You don't have Google Play Services available on your device. Make sure to install them either from the <a href="(https://play.google.com/store/apps/details?id=com.google.android.gms&amp;hl=en_US&amp;gl=US)">Play Store</a>, from <a href="http://opengapps.org/">OpenGApps</a> or follow tutorials online.</p></li>
8281
<li><pre><code class="hljs">java<span class="hljs-selector-class">.lang</span><span class="hljs-selector-class">.IllegalStateException</span>: The activity must be <span class="hljs-selector-tag">a</span> subclass of FragmentActivity
8382
</code></pre>
8483
<p>Make sure your <code>MainActivity</code> extends <code>GoogleCastActivity</code>, <code>AppCompatActivity</code>, or some other descendant of <code>FragmentActivity</code>.</p></li>

docs/getting-started/troubleshooting/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ <h2><a class="anchor" aria-hidden="true" id="other-issues"></a><a href="#other-i
7777
<ul>
7878
<li><pre><code class="hljs">com.google.android.gms.dynamite.DynamiteModule$zza: <span class="hljs-keyword">No</span> acceptable module <span class="hljs-built_in">found</span>. <span class="hljs-keyword">Local</span> <span class="hljs-keyword">version</span> <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> remote <span class="hljs-keyword">version</span> <span class="hljs-keyword">is</span> <span class="hljs-number">0.</span>
7979
</code></pre>
80-
<p>You don't have Google Play Services available on your device. Make sure to install them either from the <a href="(https://play.google.com/store/apps/details?id=com.google.android.gms&amp;hl=en_US&amp;gl=US)">Play Store</a>, from <a href="http://opengapps.org/">OpenGApps</a> or follow tutorials online.</p>
81-
<p>TODO: Handle gracefully and ignore the Cast library without crashing.</p></li>
80+
<p>You don't have Google Play Services available on your device. Make sure to install them either from the <a href="(https://play.google.com/store/apps/details?id=com.google.android.gms&amp;hl=en_US&amp;gl=US)">Play Store</a>, from <a href="http://opengapps.org/">OpenGApps</a> or follow tutorials online.</p></li>
8281
<li><pre><code class="hljs">java<span class="hljs-selector-class">.lang</span><span class="hljs-selector-class">.IllegalStateException</span>: The activity must be <span class="hljs-selector-tag">a</span> subclass of FragmentActivity
8382
</code></pre>
8483
<p>Make sure your <code>MainActivity</code> extends <code>GoogleCastActivity</code>, <code>AppCompatActivity</code>, or some other descendant of <code>FragmentActivity</code>.</p></li>

docs/getting-started/usage.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@
9999
})
100100
</code></pre>
101101
<p>Please see the <a href="../api/interfaces/medialoadrequest">MediaLoadRequest</a> documentation for available options.</p>
102+
<h3><a class="anchor" aria-hidden="true" id="android-missing-google-play-services"></a><a href="#android-missing-google-play-services" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>(Android) Missing Google Play Services</h3>
103+
<p>On Android, you can use <code>CastContext.getPlayServicesState()</code> to check if Google Play Services are installed on the device. You can then call <code>CastContext.showPlayServicesErrorDialog</code> to inform the user and prompt them to install.</p>
104+
<pre><code class="hljs css language-ts">CastContext.getPlayServicesState().then(<span class="hljs-function">(<span class="hljs-params">state</span>) =&gt;</span> {
105+
<span class="hljs-keyword">if</span> (state &amp;&amp; state !== PlayServicesState.SUCCESS)
106+
CastContext.showPlayServicesErrorDialog(state)
107+
})
108+
</code></pre>
102109
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 3/12/2022 by Petr Bela</em></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/getting-started/setup"><span class="arrow-prev"></span><span>Setup</span></a><a class="docs-next button" href="/docs/getting-started/troubleshooting"><span>Troubleshooting</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"></nav></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
103110
document.addEventListener('keyup', function(e) {
104111
if (e.target !== document.body) {

docs/getting-started/usage/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@
9999
})
100100
</code></pre>
101101
<p>Please see the <a href="../api/interfaces/medialoadrequest">MediaLoadRequest</a> documentation for available options.</p>
102+
<h3><a class="anchor" aria-hidden="true" id="android-missing-google-play-services"></a><a href="#android-missing-google-play-services" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>(Android) Missing Google Play Services</h3>
103+
<p>On Android, you can use <code>CastContext.getPlayServicesState()</code> to check if Google Play Services are installed on the device. You can then call <code>CastContext.showPlayServicesErrorDialog</code> to inform the user and prompt them to install.</p>
104+
<pre><code class="hljs css language-ts">CastContext.getPlayServicesState().then(<span class="hljs-function">(<span class="hljs-params">state</span>) =&gt;</span> {
105+
<span class="hljs-keyword">if</span> (state &amp;&amp; state !== PlayServicesState.SUCCESS)
106+
CastContext.showPlayServicesErrorDialog(state)
107+
})
108+
</code></pre>
102109
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 3/12/2022 by Petr Bela</em></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/getting-started/setup"><span class="arrow-prev"></span><span>Setup</span></a><a class="docs-next button" href="/docs/getting-started/troubleshooting"><span>Troubleshooting</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"></nav></div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
103110
document.addEventListener('keyup', function(e) {
104111
if (e.target !== document.body) {

0 commit comments

Comments
 (0)