"Jarvis?" Working pretty much perfectly

This commit is contained in:
Mathieu 2021-10-16 10:56:31 +02:00
parent 2043fc7aee
commit b57de85ffa
6 changed files with 39 additions and 45 deletions

View File

@ -4,29 +4,31 @@
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../../layout/custom_preview.xml" value="0.5354166666666667" />
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml"
value="0.36614583333333334" />
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.36614583333333334" />
<entry key="app/src/main/res/drawable/circle.xml" value="0.346875" />
<entry key="app/src/main/res/drawable/ic_launcher_background.xml"
value="0.36614583333333334" />
<entry key="app/src/main/res/drawable/ic_launcher_background.xml" value="0.36614583333333334" />
<entry key="app/src/main/res/drawable/mic.xml" value="0.346875" />
<entry key="app/src/main/res/drawable/microphone.xml" value="0.346875" />
<entry key="app/src/main/res/drawable/round_button.xml" value="0.346875" />
<entry key="app/src/main/res/drawable/rounded_white_on_top.xml"
value="0.36614583333333334" />
<entry key="app/src/main/res/layout/activity_listening.xml" value="0.536" />
<entry key="app/src/main/res/drawable/rounded_white_on_top.xml" value="0.36614583333333334" />
<entry key="app/src/main/res/layout/activity_listening.xml" value="0.16315431679129844" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.35" />
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml"
value="0.36614583333333334" />
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.36614583333333334" />
</map>
</option>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" default="true" languageLevel="JDK_11" project-jdk-name="Android Studio default JDK"
project-jdk-type="JavaSDK" version="2">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.16315431679129844" />
</ProjectState>
</option>
</component>
</project>

View File

@ -12,8 +12,8 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:showOnLockScreen="true"
android:supportsRtl="true"
android:theme="@style/Theme.JarvisClientAndroid">
@ -22,10 +22,13 @@
android:enabled="true"
android:exported="false" />
<activity android:name=".ListeningActivity"
<activity
android:name=".ListeningActivity"
android:excludeFromRecents="true"
android:theme="@style/Theme.Transparent" />
<activity android:name=".MainActivity"
<activity
android:name=".MainActivity"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -27,8 +27,7 @@ public class ListeningActivity extends AppCompatActivity {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_listening);
setContentView(R.layout.dialog_listening);
}

View File

@ -41,7 +41,6 @@ public class PorcupineService extends Service {
dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(dialogIntent);
Toast.makeText(this, "Wake-word detected!", Toast.LENGTH_SHORT).show();
});
porcupineManager.start();

View File

@ -1,15 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.AppCompat.Transparent.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
<style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>