mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-19 12:43:14 -06:00
The player has a launcher (category.HOME) + a boot receiver, but auto-start was unreliable where you can't set a home launcher (Android TV) and on Android 14+, where USE_FULL_SCREEN_INTENT is auto-revoked for non-calling apps so the boot full-screen launcher silently no-ops. Boot launch: - BootReceiver now does a direct background startActivity when 'display over other apps' (SYSTEM_ALERT_WINDOW) is granted — a real exception to the bg-activity-launch restriction, and the one path that works on Android TV. Full-screen-intent notification kept as a fallback (locked screen / no overlay). - Boot notification moved to a dedicated HIGH-importance channel (full-screen intents are only honored from one), and it auto-dismisses once the UI is up. Setup screen — new permission rows so operators can grant what boot-launch needs: - Launch on Boot (USE_FULL_SCREEN_INTENT, shown on Android 14+) - Background Activity (battery-optimization exemption) - Display Over Apps (SYSTEM_ALERT_WINDOW) Made the screen scrollable and ~50% smaller text/buttons so all rows + Continue fit on one screen (incl. landscape signage). Install-Unknown-Apps subtitle now states updates are signature-verified, so it doesn't read as 'install anything'. Verified end-to-end on an Android 16 emulator: after reboot the app auto-launched (Direct launch via overlay) and the boot notice cleared itself; all rows toggle.
126 lines
5.8 KiB
XML
126 lines
5.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
|
|
|
<application
|
|
android:name=".RemoteDisplayApp"
|
|
android:allowBackup="false"
|
|
android:icon="@android:drawable/ic_media_play"
|
|
android:label="RemoteDisplay"
|
|
android:largeHeap="true"
|
|
android:theme="@style/Theme.RemoteDisplay"
|
|
android:usesCleartextTraffic="true"
|
|
android:supportsRtl="true">
|
|
|
|
<!-- Main fullscreen media player activity -->
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:exported="true"
|
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
|
android:screenOrientation="landscape"
|
|
android:theme="@style/Theme.RemoteDisplay.Fullscreen"
|
|
android:keepScreenOn="true"
|
|
android:launchMode="singleTask">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
|
</intent-filter>
|
|
<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>
|
|
|
|
<!-- Screen capture permission request (transparent) -->
|
|
<activity
|
|
android:name=".ScreenCapturePermissionActivity"
|
|
android:exported="false"
|
|
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
|
android:screenOrientation="landscape" />
|
|
|
|
<!-- Initial setup wizard (permissions) -->
|
|
<activity
|
|
android:name=".SetupActivity"
|
|
android:exported="false"
|
|
android:screenOrientation="landscape"
|
|
android:theme="@style/Theme.RemoteDisplay.Fullscreen" />
|
|
|
|
<!-- Provisioning/setup activity -->
|
|
<activity
|
|
android:name=".ProvisioningActivity"
|
|
android:exported="false"
|
|
android:screenOrientation="landscape"
|
|
android:theme="@style/Theme.RemoteDisplay.Fullscreen" />
|
|
|
|
<!-- WebSocket foreground service. #5: declares ONLY mediaPlayback - the
|
|
always-on service must not claim the mediaProjection FGS type, which
|
|
Android 14+ rejects unless a projection consent token is held. -->
|
|
<service
|
|
android:name=".service.WebSocketService"
|
|
android:exported="false"
|
|
android:foregroundServiceType="mediaPlayback" />
|
|
|
|
<!-- #5: dedicated MediaProjection foreground service for system screen
|
|
capture. Started only after the user grants consent, so claiming the
|
|
mediaProjection FGS type is valid on Android 14+. -->
|
|
<service
|
|
android:name=".service.MediaProjectionService"
|
|
android:exported="false"
|
|
android:foregroundServiceType="mediaProjection" />
|
|
|
|
<!-- Accessibility service for power controls -->
|
|
<service
|
|
android:name=".service.PowerAccessibilityService"
|
|
android:exported="true"
|
|
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
|
|
<intent-filter>
|
|
<action android:name="android.accessibilityservice.AccessibilityService" />
|
|
</intent-filter>
|
|
<meta-data
|
|
android:name="android.accessibilityservice"
|
|
android:resource="@xml/accessibility_service_config" />
|
|
</service>
|
|
|
|
<!-- Boot receiver for auto-start -->
|
|
<receiver
|
|
android:name=".service.BootReceiver"
|
|
android:enabled="true"
|
|
android:exported="true">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
|
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
|
|
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
|
|
</intent-filter>
|
|
</receiver>
|
|
|
|
<!-- FileProvider for APK updates -->
|
|
<provider
|
|
android:name="androidx.core.content.FileProvider"
|
|
android:authorities="${applicationId}.fileprovider"
|
|
android:exported="false"
|
|
android:grantUriPermissions="true">
|
|
<meta-data
|
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
android:resource="@xml/file_paths" />
|
|
</provider>
|
|
|
|
</application>
|
|
</manifest>
|