Skip to content

Commit

Permalink
Make launch behavior optional.
Browse files Browse the repository at this point in the history
Bug: 72950561
Signed-off-by: Dave Smith <smithdave@google.com>

Change-Id: Ib0a43163f915af7b88b225108a84d0bfae3829c3
  • Loading branch information
Dave Smith committed Apr 5, 2018
1 parent bf59ea6 commit 6154391
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ sample) but you can't hear your media playing through the audio jack, check if
you have an HDMI display connected. If so, the audio will be routed to the HDMI
output.

## Enable auto-launch behavior

This sample app is currently configured to launch only when deployed from your
development machine. To enable the main activity to launch automatically on boot,
add the following `intent-filter` to the app's manifest file:

```xml
<activity ...>

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>

</activity>
```

## License

Copyright 2017 The Android Open Source Project, Inc.
Expand All @@ -59,4 +77,4 @@ License for the specific language governing permissions and limitations under
the License.

[demo-yt]: https://www.youtube.com/watch?v=EDV_DaspP60&list=PLWz5rJ2EKKc-GjpNkFe9q3DhE2voJscDT&index=2
[demo-gif]: demo1.gif
[demo-gif]: demo1.gif
9 changes: 7 additions & 2 deletions audio-sink/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,17 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<!-- Launch activity automatically on Android Things boot -->
<!--
Uncomment the following intent filter block to enable this activity to
launch automatically on boot, and re-launch if the app terminates.
-->
<!--
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.IOT_LAUNCHER"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
-->
</activity>

</application>
Expand Down

0 comments on commit 6154391

Please sign in to comment.