am 0d756f7d: am 217a4356: am a8bdd2f3: am 42bb44db: Merge "docs: Remove deprecated Fitness information from this doc. Guides have been moved to developers.google.com/fit" into lmp-docs

* commit '0d756f7d5646f84753a3db5f702f4ac79bda22bf':
  docs: Remove deprecated Fitness information from this doc. Guides have been moved to developers.google.com/fit
This commit is contained in:
Luan Nguyen
2015-03-13 18:28:45 +00:00
committed by Android Git Automerger

View File

@@ -50,15 +50,6 @@ page.tags="IntentFilter"
<li><a href="#OpenFile">Open a specific type of file</a></li>
</ol>
</li>
<li><a href="#Fitness">Fitness</a>
<ol>
<li><a href="#TrackRide">Start/Stop a bike ride</a></li>
<li><a href="#TrackRun">Start/Stop a run</a></li>
<li><a href="#TrackWorkout">Start/Stop a workout</a></li>
<li><a href="#ShowHR">Show heart rate</a></li>
<li><a href="#ShowStepCount">Show step count</a></li>
</ol>
</li>
<li><a href="#Local">Local Actions</a>
<ol>
<li><a href="#CallCar">Call a car</a></li>
@@ -1348,391 +1339,6 @@ Framework</a> guide.</p>
<h2 id="Fitness">Fitness</h2>
<h3 id="TrackRide">Start/Stop a bike ride</h3>
<!-- Google Now box -->
<div class="now-box">
<div class="now-img-cont">
<a href="#Now">
<img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
width="30" height="30" alt=""/>
</a>
</div>
<p class="now-title">Google Now</p>
<ul>
<li>"start cycling"</li>
<li>"start my bike ride"</li>
<li>"stop cycling"</li>
</ul>
</div>
<p>To track a bike ride, use the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>ACTION_TRACK</code></a> action with the <code>"vnd.google.fitness.activity/biking"</code>
MIME type and set the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#EXTRA_STATUS">
<code>EXTRA_STATUS</code></a> extra to
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_ACTIVE">
<code>STATUS_ACTIVE</code></a> when starting and to
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_COMPLETED">
<code>STATUS_COMPLETED</code></a> when stopping.</p>
<dl>
<dt><b>Action</b></dt>
<dd><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>ACTION_TRACK</code></a><dd>
<dt><b>Data URI</b></dt>
<dd>None</dd>
<dt><b>MIME Type</b></dt>
<dd><code>"vnd.google.fitness.activity/biking"</code></dd>
<dt><b>Extras</b></dt>
<dd>
<dl>
<dt><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#EXTRA_STATUS">
<code>EXTRA_STATUS</code></a></dt>
<dd>A string with the value <a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_ACTIVE">
<code>STATUS_ACTIVE</code></a> when starting and
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_COMPLETED">
<code>STATUS_COMPLETED</code></a> when stopping.</dd>
</dl>
</dd>
</dl>
<p><b>Example intent:</b></p>
<pre>
public void startBikeRide() {
Intent intent = new Intent(FitnessIntents.ACTION_TRACK)
.setType("vnd.google.fitness.activity/biking")
.putExtra(FitnessIntents.EXTRA_STATUS, FitnessIntents.STATUS_ACTIVE);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
}
</pre>
<p><b>Example intent filter:</b></p>
<pre>
&lt;activity ...>
&lt;intent-filter>
&lt;action android:name="vnd.google.fitness.TRACK" />
&lt;data android:mimeType="vnd.google.fitness.activity/biking" />
&lt;category android:name="android.intent.category.DEFAULT" />
&lt;/intent-filter>
&lt;/activity>
</pre>
<h3 id="TrackRun">Start/Stop a run</h3>
<!-- Google Now box -->
<div class="now-box">
<div class="now-img-cont">
<a href="#Now">
<img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
width="30" height="30" alt=""/>
</a>
</div>
<p class="now-title">Google Now</p>
<ul>
<li>"track my run"</li>
<li>"start running"</li>
<li>"stop running"</li>
</ul>
</div>
<p>To track a run, use the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>ACTION_TRACK</code></a> action with the <code>"vnd.google.fitness.activity/running"</code>
MIME type and set the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#EXTRA_STATUS">
<code>EXTRA_STATUS</code></a> extra to
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_ACTIVE">
<code>STATUS_ACTIVE</code></a> when starting and to
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_COMPLETED">
<code>STATUS_COMPLETED</code></a> when stopping.</p>
<dl>
<dt><b>Action</b></dt>
<dd><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>ACTION_TRACK</code></a><dd>
<dt><b>Data URI</b></dt>
<dd>None</dd>
<dt><b>MIME Type</b></dt>
<dd><code>"vnd.google.fitness.activity/running"</code></dd>
<dt><b>Extras</b></dt>
<dd>
<dl>
<dt><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#EXTRA_STATUS">
<code>EXTRA_STATUS</code></a></dt>
<dd>A string with the value <a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_ACTIVE">
<code>STATUS_ACTIVE</code></a> when starting and
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_COMPLETED">
<code>STATUS_COMPLETED</code></a> when stopping.</dd>
</dl>
</dd>
</dl>
<p><b>Example intent:</b></p>
<pre>
public void startRun() {
Intent intent = new Intent(FitnessIntents.ACTION_TRACK)
.setType("vnd.google.fitness.activity/running")
.putExtra(FitnessIntents.EXTRA_STATUS, FitnessIntents.STATUS_ACTIVE);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
}
</pre>
<p><b>Example intent filter:</b></p>
<pre>
&lt;activity ...>
&lt;intent-filter>
&lt;action android:name="vnd.google.fitness.TRACK" />
&lt;data android:mimeType="vnd.google.fitness.activity/running" />
&lt;category android:name="android.intent.category.DEFAULT" />
&lt;/intent-filter>
&lt;/activity>
</pre>
<h3 id="TrackWorkout">Start/Stop a workout</h3>
<!-- Google Now box -->
<div class="now-box">
<div class="now-img-cont">
<a href="#Now">
<img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
width="30" height="30" alt=""/>
</a>
</div>
<p class="now-title">Google Now</p>
<ul>
<li>"start a workout"</li>
<li>"track my workout"</li>
<li>"stop workout"</li>
</ul>
</div>
<p>To track a workout, use the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>ACTION_TRACK</code></a> action with the <code>"vnd.google.fitness.activity/other"</code>
MIME type and set the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#EXTRA_STATUS">
<code>EXTRA_STATUS</code></a> extra to
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_ACTIVE">
<code>STATUS_ACTIVE</code></a> when starting and to
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_COMPLETED">
<code>STATUS_COMPLETED</code></a> when stopping.</p>
<dl>
<dt><b>Action</b></dt>
<dd><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>ACTION_TRACK</code></a><dd>
<dt><b>Data URI</b></dt>
<dd>None</dd>
<dt><b>MIME Type</b></dt>
<dd><code>"vnd.google.fitness.activity/other"</code></dd>
<dt><b>Extras</b></dt>
<dd>
<dl>
<dt><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#EXTRA_STATUS">
<code>EXTRA_STATUS</code></a></dt>
<dd>A string with the value <a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_ACTIVE">
<code>STATUS_ACTIVE</code></a> when starting and
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#STATUS_COMPLETED">
<code>STATUS_COMPLETED</code></a> when stopping.</dd>
</dl>
</dd>
</dl>
<p><b>Example intent:</b></p>
<pre>
public void startWorkout() {
Intent intent = new Intent(FitnessIntents.ACTION_TRACK)
.setType("vnd.google.fitness.activity/other")
.putExtra(FitnessIntents.EXTRA_STATUS, FitnessIntents.STATUS_ACTIVE);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
}
</pre>
<p><b>Example intent filter:</b></p>
<pre>
&lt;activity ...>
&lt;intent-filter>
&lt;action android:name="vnd.google.fitness.TRACK" />
&lt;data android:mimeType="vnd.google.fitness.activity/other" />
&lt;category android:name="android.intent.category.DEFAULT" />
&lt;/intent-filter>
&lt;/activity>
</pre>
<h3 id="ShowHeartRate">Show heart rate</h3>
<!-- Google Now box -->
<div class="now-box">
<div class="now-img-cont">
<a href="#Now">
<img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
width="30" height="30" alt=""/>
</a>
</div>
<p class="now-title">Google Now</p>
<ul>
<li>"what's my heart rate?"</li>
<li>"what's my bpm?"</li>
</ul>
</div>
<p>To show the user's heart rate, use the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_VIEW">
<code>ACTION_VIEW</code></a> action with the
<code>"vnd.google.fitness.data_type/com.google.heart_rate.bpm"</code> MIME type.</p>
<dl>
<dt><b>Action</b></dt>
<dd><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_VIEW">
<code>ACTION_VIEW</code></a><dd>
<dt><b>Data URI</b></dt>
<dd>None</dd>
<dt><b>MIME Type</b></dt>
<dd><code>"vnd.google.fitness.data_type/com.google.heart_rate.bpm"</code></dd>
<dt><b>Extras</b></dt>
<dd>None</dd>
</dl>
<p><b>Example intent:</b></p>
<pre>
public void showHeartRate() {
Intent intent = new Intent(FitnessIntents.ACTION_VIEW)
.setType("vnd.google.fitness.data_type/com.google.heart_rate.bpm");
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
}
</pre>
<p><b>Example intent filter:</b></p>
<pre>
&lt;activity ...>
&lt;intent-filter>
&lt;action android:name="vnd.google.fitness.VIEW" />
&lt;data android:mimeType="vnd.google.fitness.data_type/com.google.heart_rate.bpm" />
&lt;category android:name="android.intent.category.DEFAULT" />
&lt;/intent-filter>
&lt;/activity>
</pre>
<h3 id="ShowStepCount">Show step count</h3>
<!-- Google Now box -->
<div class="now-box">
<div class="now-img-cont">
<a href="#Now">
<img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
width="30" height="30" alt=""/>
</a>
</div>
<p class="now-title">Google Now</p>
<ul>
<li>"how many steps have I taken?"</li>
<li>"what's my step count?"</li>
</ul>
</div>
<p>To show the user's step count, use the
<a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_VIEW">
<code>ACTION_VIEW</code></a> action with the
<code>"vnd.google.fitness.data_type<br/>/com.google.step_count<br/>.cumulative"</code> MIME
type.</p>
<dl>
<dt><b>Action</b></dt>
<dd><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_VIEW">
<code>ACTION_VIEW</code></a><dd>
<dt><b>Data URI</b></dt>
<dd>None</dd>
<dt><b>MIME Type</b></dt>
<dd><code>"vnd.google.fitness.data_type/com.google.step_count.cumulative"</code></dd>
<dt><b>Extras</b></dt>
<dd>None</dd>
</dl>
<p><b>Example intent:</b></p>
<pre>
public void showStepCount() {
Intent intent = new Intent(FitnessIntents.ACTION_VIEW)
.setType("vnd.google.fitness.data_type/com.google.step_count.cumulative");
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
}
</pre>
<p><b>Example intent filter:</b></p>
<pre>
&lt;activity ...>
&lt;intent-filter>
&lt;action android:name="vnd.google.fitness.VIEW" />
&lt;data android:mimeType="vnd.google.fitness.data_type/com.google.step_count.cumulative" />
&lt;category android:name="android.intent.category.DEFAULT" />
&lt;/intent-filter>
&lt;/activity>
</pre>
<h2 id="Local">Local Actions</h2>
<h3 id="CallCar">Call a car</h3>
@@ -2694,65 +2300,6 @@ about declaring each intent filter, click on the action description.</p>
</td>
<td>{@link android.content.Intent#ACTION_CALL Intent.ACTION_CALL}</td>
</tr>
<tr>
<td rowspan="5" style="vertical-align:middle">Fitness</td>
<td>
<p><a href="#TrackRide">Start/stop a bike ride</a></p>
<ul class="now-list">
<li>"start cycling"</li>
<li>"start my bike ride"</li>
<li>"stop cycling"</li>
</ul>
</td>
<td><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>FitnessIntents.ACTION_TRACK</code></a></td>
</tr>
<tr>
<td>
<p><a href="#TrackRun">Start/stop a run</a></p>
<ul class="now-list">
<li>"track my run"</li>
<li>"start running"</li>
<li>"stop running"</li>
</ul>
</td>
<td><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>FitnessIntents.ACTION_TRACK</code></a></td>
</tr>
<tr>
<td>
<p><a href="#TrackWorkout">Start/stop a workout</a></p>
<ul class="now-list">
<li>"start a workout"</li>
<li>"track my workout"</li>
<li>"stop workout"</li>
</ul>
</td>
<td><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_TRACK">
<code>FitnessIntents.ACTION_TRACK</code></a></code></td>
</tr>
<tr>
<td>
<p><a href="#ShowHeartRate">Show heart rate</a></p>
<ul class="now-list">
<li>"what's my heart rate"</li>
<li>"what's my bpm"</li>
</ul>
</td>
<td><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_VIEW">
<code>FitnessIntents.ACTION_VIEW</code></a></code></td>
</tr>
<tr>
<td>
<p><a href="#ShowStepCount">Show step count</a></p>
<ul class="now-list">
<li>"how many steps have I taken"</li>
<li>"what's my step count"</li>
</ul>
</td>
<td><a href="{@docRoot}reference/com/google/android/gms/fitness/FitnessIntents.html#ACTION_VIEW">
<code>FitnessIntents.ACTION_VIEW</code></a></td>
</tr>
<tr>
<td style="vertical-align:middle">Local</td>
<td>