From fca90bbaccb6c52431f882b24d636ac067f03e6a Mon Sep 17 00:00:00 2001 From: Elliot Wolk Date: Thu, 24 Feb 2022 12:50:28 -0500 Subject: [PATCH] android: add intents for pageUp/pageDown/ttsPlay --- android/src/org/coolreader/CoolReader.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/src/org/coolreader/CoolReader.java b/android/src/org/coolreader/CoolReader.java index 870202787..7fb17b66c 100644 --- a/android/src/org/coolreader/CoolReader.java +++ b/android/src/org/coolreader/CoolReader.java @@ -741,7 +741,17 @@ private boolean processIntent(Intent intent) { if (uri != null) { fileToOpen = filePathFromUri(uri); } + } else if ("org.coolreader.PAGE_UP".equals(intent.getAction())) { + mReaderView.onCommand(ReaderCommand.DCMD_PAGEUP, 0, null); + return true; + } else if ("org.coolreader.PAGE_DOWN".equals(intent.getAction())) { + mReaderView.onCommand(ReaderCommand.DCMD_PAGEDOWN, 0, null); + return true; + } else if ("org.coolreader.TTS_PLAY".equals(intent.getAction())) { + mReaderView.onCommand(ReaderCommand.DCMD_TTS_PLAY, 0, null); + return true; } + if (fileToOpen == null && intent.getExtras() != null) { log.d("extras=" + intent.getExtras()); fileToOpen = intent.getExtras().getString(OPEN_FILE_PARAM);