Skip to content

Conversation

@rishabhhgupta
Copy link

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

This pull request introduces a complete emoji search feature to enhance usability and make emoji selection faster and more intuitive.

Key improvements include:

  • Added a search bar to the emoji palette UI.
  • Implemented OtherInputConnection.kt to allow typing into the AppCompatAutoCompleteTextView used for emoji search.
  • Added a new view for displaying search results; shows recent emojis by default and updates based on user queries.
  • Added multiple CSV files (emoji_category_*.csv) containing emojis and search keywords for all categories.
  • Updated EmojiHelper.kt to parse the CSV files and added the new searchEmojis function.
  • Integrated search logic into MyKeyboardView.kt, handling focus changes and input routing.
  • Added supporting UI elements: new strings, colors, and a search icon.
  • Modified SimpleKeyboardIME.kt to switch between the default input connection and OtherInputConnection when the search view is active.
  • Added new methods to OnKeyboardActionListener.

Tests performed

  • Manual testing on Android device - Android 15 and on Emulators android 13 and 14.

Before & after preview

Video demonstration

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes.
  • I updated CHANGELOG.md.
  • I self-reviewed my pull request.
  • All checks are passing.

…view

This commit introduces a comprehensive emoji search feature and the necessary infrastructure to support it.

Key changes include:
- Adds a search bar to the emoji palette.
- Implements `OtherInputConnection.kt` to handle text input into the `AppCompatAutoCompleteTextView` used for emoji search, allowing the keyboard to type into the search field.
- Creates a new view for displaying emoji search results, which shows recent emojis by default and updates based on the user's query.
- Adds CSV files (`emoji_category_*.csv`) containing emojis and associated search keywords for various categories (People, Nature, Food, etc.).
- Updates `EmojiHelper.kt` to parse the new CSV files and adds a `searchEmojis` function.
- Integrates the search logic into `MyKeyboardView.kt`, handling focus changes and text input for the search bar.
- Adds new string resources, colors, and a search icon to support the UI changes.
- Modifies `SimpleKeyboardIME.kt` to switch between the standard input connection and the new `OtherInputConnection` when the emoji search is active.
- Introduces new methods in the `OnKeyboardActionListener` interface for handling search view focus and updating the shift state.
Improve emoji handling and add constants

This commit introduces several improvements to the emoji handling functionality:

- **Refactors emoji search and recents:**
    - Defines a `MAX_RECENT_EMOJIS` constant for clarity when retrieving recently used emojis.
    - Adds a `MAX_SEARCH_RESULTS` constant to limit the number of emojis returned from a search.
- **Enhances error handling:**
    - Improves exception handling in `getEmojisFromAssets` to catch more specific `IOException`, `IllegalArgumentException`, and `IndexOutOfBoundsException` during emoji file parsing.
    - Adds specific `IOException` and `JSONException` handling when parsing raw JSON files.
- **Code cleanup:**
    - Simplifies conditional logic in `getEmojisFromAssets`.
Replaces the `IndexOutOfBoundsException` catch block with a more general `IOException` to handle potential file reading errors. This provides more robust error logging when processing emoji data files.
@rishabhhgupta
Copy link
Author

I'm androidx.emojipicker guy

@rishabhhgupta
Copy link
Author

Dude I'm waiting. Are you reviewing the changes or is something is wrong here, if something has then please mention me, I will fix that

@naveensingh
Copy link
Member

Yes, I'll check this soon.

@rishabhhgupta
Copy link
Author

Any updates?

@rishabhhgupta
Copy link
Author

dead-my-honest-reaction

@naveensingh
Copy link
Member

naveensingh commented Dec 3, 2025

Please be patient. When it is reviewed, you'll be notified.

Copy link
Member

@naveensingh naveensingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but even without the emoji picker module, this still isn't the approach.

  • The CSV dataset will not be easy to localize, and that is a major blocker. Fossify users are from all over the globe.
  • The dataset contains many unnecessary NSFW descriptors for emojis that will get flagged on the stores. Some are also politically leaning instead of being neutral. References like SpongeBob's house and I'm dying also do not belong in a static dataset.
  • The search UI is very old school.

And again, please try not to ignore issue assignments. If you'd like to work on any other feature, here are some open issues.

@rishabhhgupta
Copy link
Author

rishabhhgupta commented Dec 11, 2025

Sorry, it's my first ever PR request, here are a few points I want to say

  1. I will add the right localization instead of CSV from CLDR. Actually, I got the CSV file from the EmojiPicker module from here.

  2. For the NSFW content I actually used a lot of google keyboard and miss the right name for the emoji so in the csv I added some right emoji name and mostly all of the emoji names is rewritten for the Gemini as per a modern use term now in place of this I add the generic use term that uses by emoji picker and not in the csv I will use strings.xml manner so it's easy to localize later more.

  3. SearchUI yeah it's pretty old school I earlier try with Material SearchView and Androidx SearchView but they didn't expose their variable to attached the Input Connection only way to do that is get the source code and modify there maybe that my limitation I try also using extension function but didn't work but in the AutoCompleteTextSearchView it expose their variable to attached the input connection, the connection I do is the OtherInputConnection.kt.

At last I will add localize and translated emoji search term and in place of more modern and NSFW Content I will add more generic search term in the xml format and at last if you say I can use more modern Searchview by researching more on this, I also have one of my keyboard app on the play store that uses fork of SimpleKeyboard that have word suggestion and tenor gifs API. Looking forward for your reply.

@naveensingh
Copy link
Member

I'll be working on this feature.

@rishabhhgupta
Copy link
Author

soon I will send the PR again after fixing the point that you mentioned

@naveensingh
Copy link
Member

I meant I'll be working on #23 myself. Please stop working on it.

@rishabhhgupta
Copy link
Author

That means all my hardwork is gone I thought I wll add this on my resume either way, if possible, make my work useful by adding my code or algorithm in this issue, Sad to say but ok understood I will not work on this issue :]

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.

2 participants