Recently Written · git

subread-dictionary

Pop-up dictionary for Android that reads Yomitan dictionaries, with local audio

git clone https://github.com/equwal/subread-dictionary

Log | Files | Refs


app/src/main/AndroidManifest.xml (3465 bytes)

1 <?xml version="1.0" encoding="utf-8"?>
2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3     xmlns:tools="http://schemas.android.com/tools">
4 
5     <!-- For the remote audio sources only. They are off until the user turns them on. -->
6     <uses-permission android:name="android.permission.INTERNET" />
7 
8     <!-- SubRead Anki takes a card from the pop-up. Android hides other apps without this list. -->
9     <queries>
10         <package android:name="space.subread.anki" />
11     </queries>
12 
13     <application
14         android:allowBackup="false"
15         android:icon="@drawable/icon"
16         android:label="@string/app_name"
17         android:supportsRtl="true"
18         android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar"
19         android:usesCleartextTraffic="true">
20 
21         <!-- The settings: the dictionaries, the audio. -->
22         <activity
23             android:name=".MainActivity"
24             android:exported="true">
25             <intent-filter>
26                 <action android:name="android.intent.action.MAIN" />
27                 <category android:name="android.intent.category.LAUNCHER" />
28             </intent-filter>
29         </activity>
30 
31         <!--
32             The pop-up. Three ways in: the text selection menu of Android ("SubRead Dictionary"
33             in the menu), the share sheet, and a plain intent from another app such as SubRead
34             Overlay. It has no task of its own, so it opens over the app that sent the text.
35         -->
36         <activity
37             android:name=".LookupActivity"
38             android:excludeFromRecents="true"
39             android:exported="true"
40             android:label="@string/lookup_label"
41             android:launchMode="singleTop"
42             android:taskAffinity=""
43             android:theme="@style/Popup">
44             <intent-filter>
45                 <action android:name="android.intent.action.PROCESS_TEXT" />
46                 <category android:name="android.intent.category.DEFAULT" />
47                 <data android:mimeType="text/plain" />
48             </intent-filter>
49             <intent-filter>
50                 <action android:name="android.intent.action.SEND" />
51                 <category android:name="android.intent.category.DEFAULT" />
52                 <data android:mimeType="text/plain" />
53             </intent-filter>
54             <intent-filter>
55                 <action android:name="space.subread.dictionary.LOOKUP" />
56                 <category android:name="android.intent.category.DEFAULT" />
57             </intent-filter>
58         </activity>
59 
60         <!--
61             Gives the terms of a text and the audio of a term to another app: SubRead Anki. The
62             dictionaries are public data, so the provider has no permission. See LookupProvider.
63         -->
64         <provider
65             android:name=".LookupProvider"
66             android:authorities="${applicationId}.lookup"
67             android:exported="true"
68             tools:ignore="ExportedContentProvider" />
69 
70         <!-- SubRead Anki reads the audio of a card through this provider. -->
71         <provider
72             android:name="androidx.core.content.FileProvider"
73             android:authorities="${applicationId}.files"
74             android:exported="false"
75             android:grantUriPermissions="true">
76             <meta-data
77                 android:name="android.support.FILE_PROVIDER_PATHS"
78                 android:resource="@xml/files" />
79         </provider>
80     </application>
81 </manifest>