Skip to content

Conversation

Inhishonor
Copy link
Collaborator

This will close #300, once I get it to work, I just wanted to put it out there, in case anyone has better ideas on how to do it. Unfortunately, I had to rebase it, so it may be a tad hard to read.

Inhishonor and others added 6 commits February 19, 2025 13:29
* Update build-on-pull.yml

Update's versions.

* Update build-on-pull.yml

Update Versions and add code to add the signing keys to the build.

* Update build-on-pull.yml

* Fixes the size of the icon.png.

* Update build-on-pull.yml

Fixes the formatting of the keystore injections.

* Update build-on-pull.yml

Changes it to only set up a NoAnalyticsDebug.

* Update build-on-pull.yml

Remove --stacktrace.

* attachment context menu for save, share, forward and open externally
remove share icons from audio and file attachment types
add forward and open externally to gallery menu so it matches attachment context menu
new icon/button for resend message

* Update build-and-release.yml

* Update build-on-pull.yml

* Update PR-deploy.yml

* Update build-and-release.yml

* Update PR-deploy.yml

* fix npe when setting out icons in messagesadapter when in message

* Update strings.xml

Change to "Leave A Star".

* new setting to show/hide new stt button - defaults to 'show' to enable discovery by user. move compose stt feature from double-tap compose entry box to new button on compose activity

* change tools view to 'on' for messageList

* changes to ingest all attachments in a standard manner. does not change user-facing functionality

* changes to make the speed-to-text button drag-and-dropable

* rebased to latest master

* changes to fix non-reset media player re-use crash

* manual update to fix my rebase merge

* changes to record audio for audio message from bluetooth sco device (ie bluetooth headset or earbuds) if connected at time of record

* changes to fix a bug that appeared to be a race condition between deleting mms parts (attachments) and removing the message data from the realm db when deleting a message. there could be attempts to access part data that no longer exists. protected where the access was being attempted.

* Update compose.xml

Fixed showing the copy text details, rather than message details.

* changes to enable a delete/clear menu icon on compose screen when there is message contents to clear - ie a schedule set, text input or attachments added

* changed to reset all necessary state, regardless of editingMode, in clearCurrentMessageIntent handler

* changes to make scheduled messages activity ui compliant with the rest of the app message listing activities. now allows sending and deleting multiple scheduled messages at once

* fixed title of send now confirm dialog

---------

Co-authored-by: octoshrimpy <octoshrimpy@users.noreply.github.com>
Co-authored-by: gavine99 <github@xymail.tk>
@Inhishonor
Copy link
Collaborator Author

I did my best to resolve all the conflicts...Hopefully it worked.

Removed duplicate code.
@gavine99
Copy link
Contributor

@Inhishonor i think the version of queryIntentActivities used in this pr is deprecated in newer android api versions. conditional sdk code such as below may be better;

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.packageManager
.queryIntentActivities(
Intent(Intent.ACTION_VIEW).setDataAndType(this, getType(context)),
PackageManager.ResolveInfoFlags.of(
PackageManager.MATCH_DEFAULT_ONLY.toLong()
)
).let {
if (it.size > 0) it[0].loadIcon(context.packageManager)
else null
}
} else {
// else, pre-tiramisu versions
context.packageManager
.queryIntentActivities(
Intent(Intent.ACTION_VIEW).setDataAndType(this, getType(context)),
PackageManager.MATCH_DEFAULT_ONLY
).let {
if (it.size > 0) it[0].loadIcon(context.packageManager)
else null
}
}

Add import to use package manager.
@Inhishonor
Copy link
Collaborator Author

Thanks @gavine99! I will implement that.

Rebase code with master branch.
Add SDK conditional to check for package manager.
Wrap `onCreate` in an if block that checks if Speech Recognition is even possible.
Cleaned up comments.
Added a getString, to extra.prompt, so that it will be easier to implement in the future.
Moved the check on STT provider to only display toast if there is no provider.
Disabled STT button when there is no provider.
@Inhishonor Inhishonor marked this pull request as ready for review February 21, 2025 21:37
@Inhishonor Inhishonor changed the title WIP Check to see if STT provider is available and if not abort process. Check to see if STT provider is available and if not abort process. Feb 21, 2025
@Inhishonor
Copy link
Collaborator Author

Inhishonor commented Feb 21, 2025

I changed the compose activity in a few places, so that a toast would be displayed on startup and on tapping the STT button. It also disables the STT button, so that Quik doesn't crash. Never mind, the app doesn't work with any other STT than the default, sorry. Fixed

@Inhishonor Inhishonor marked this pull request as draft February 21, 2025 21:50
Changed code to use Speech Recognizer instead of Package Manager, this allowed to check for all STT, not just default.
Also switched to using try/catch instead of if/else,
@Inhishonor
Copy link
Collaborator Author

Inhishonor commented Feb 22, 2025

Finally fixed, my apologies that it took so long. I ended up using an entirely different process than the package manager, as that apparently doesn't recognize third-party STT only the default. 🤷 I also had to remove the message on startup in 2b94ad5 because it was annoying to have it open on every conversation list, and it didn't work reliably for some reason.

@Inhishonor Inhishonor marked this pull request as ready for review February 22, 2025 00:53
Removed message on startup, as it is acting unreliably, and is annoying to the user.
@octoshrimpy octoshrimpy merged commit 0af6abd into octoshrimpy:master Feb 23, 2025
2 checks passed
@Inhishonor Inhishonor deleted the error-no-stt branch February 23, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 [BUG] Quik crashes when no STT provider is available.
3 participants