This gives a basic working implementation of a persist running service that can start a voice interaction when it wants, with the target activity(s) able to go through the protocol to interact with it. It may even work when the screen is off by putting the activity manager in the correct state to act like the screen is on. Includes a sample app that is a voice interation service and also has an activity it can launch. Now that I have this initial implementation, I think I want to rework some aspects of the API. Change-Id: I7646d0af8fb4ac768c63a18fe3de43f8091f60e9
38 lines
1.3 KiB
XML
38 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
>
|
|
|
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
android:text="We are interacting!"
|
|
/>
|
|
|
|
<TextView android:id="@+id/log"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0px"
|
|
android:layout_weight="1"
|
|
android:layout_marginTop="10dp"
|
|
android:textSize="12sp"
|
|
android:textColor="#ffffffff"
|
|
/>
|
|
|
|
</LinearLayout>
|