Android: paste PGN, open files from other apps, a calmer screen while the engine thinks
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

- Paste: «Add a database» offers the clipboard's games when it holds text; they are kept
  in the app as a copy (one game opens on the board). Text with no game is said so.
- Open with / Share: PGN, ZIP, 7z, .cbv from other apps are copied in, listed and opened;
  one copy at a time, the last one shown; not again from Recents; a lone .cbh says to
  add its folder. A copy is marked «copy» and removing it deletes it.
- Engine: the button turns it off again; its words reach the screen up to 5 times a
  second and redraw only the strip and the arrows; Stockfish runs at nice 10 (uci
  EngineConfig::nice) with 2 threads by default.
- PGN scan: tags right after a result on the same line start the next game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-23 02:06:08 +03:00
parent cb61f546ba
commit 7d77a1aaef
26 changed files with 618 additions and 66 deletions

View file

@ -12,13 +12,37 @@
android:theme="@style/Theme.ChessPenguin"
android:localeConfig="@xml/locales_config"
android:enableOnBackInvokedCallback="true">
<!-- One task: a file opened from another app comes to the app already open. -->
<activity
android:name=".MainActivity"
android:exported="true">
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- "Open with": PGN, ZIP, 7z, and files of no known type (.cbv, and .pgn
from apps that do not know it). -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content" />
<data android:mimeType="application/x-chess-pgn" />
<data android:mimeType="application/vnd.chess-pgn" />
<data android:mimeType="application/zip" />
<data android:mimeType="application/x-7z-compressed" />
<data android:mimeType="application/octet-stream" />
</intent-filter>
<!-- "Share" with a file of the same kinds. -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/x-chess-pgn" />
<data android:mimeType="application/vnd.chess-pgn" />
<data android:mimeType="application/zip" />
<data android:mimeType="application/x-7z-compressed" />
<data android:mimeType="application/octet-stream" />
</intent-filter>
</activity>
</application>