Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toggle option for search feature in other apps. #4131

Open
Popolechien opened this issue Dec 10, 2024 · 17 comments
Open

toggle option for search feature in other apps. #4131

Popolechien opened this issue Dec 10, 2024 · 17 comments
Assignees

Comments

@Popolechien
Copy link
Member

From a user: Samsung Tab S4(smt835) and A14 (sma145f/n).

Medical Wiki and Kiwix apps for Android, both have a feature which adds links to search within those apps when you select text in another app.

These links are something which I will never use...but they force themselves onto the shortcut popup. They also push "web search" (which I use daily) off of the popup and into the extended 3-dot menu.

It is annoying enough that I am about to delete both of your apps. Please add a toggle to disable this shortcut feature so I can re-install what are otherwise brilliant apps.

From my exploration into the matter, that context menu is all handled by the android system. So, the only control that can be applied is by adding/removing apps which utilise this feature...or potentially by adding a toggle to remove the feature's implementation from within the app. I havent looked into how much work adding a toggle would be...though it should be possible (in theory).

One other thing to consider is that the text used in the context menu links should be as short as possible to save space for other links on the menu. "search Kiwix" is relatively short. "Search medical wikipedia" though is about 3x as long as it should be. Shortening to "ask wikimed" and "ask kiwix" would be an improvement and should be incredibly easy to implement. Better yet... shorten to just "kiwix" and "wikimed".

@ayush1009208
Copy link

Helo @Popolechien can i work on this issue?

@Popolechien
Copy link
Member Author

@ayush1009208 sure thing.

@ayush1009208
Copy link

Also @Popolechien i have on question if you dont mind

@Popolechien
Copy link
Member Author

@ayush1009208 If this is code-related then @MohitMaliFtechiz is the lead dev here and better equipped to handle them.

@ayush1009208
Copy link

ayush1009208 commented Dec 15, 2024

@Popolechien Naah actually its related to the org is kiwix comming for gsoc this year?

@Popolechien
Copy link
Member Author

Yes but projects have not been discussed yet

@ayush1009208
Copy link

Is there any discord channel i can join?

@Popolechien
Copy link
Member Author

Nope.

@akshitsgn
Copy link

To address the issue of unwanted text selection shortcuts, we can add the Toggle Option for the context menu using the SharedPreferences to enable/disable the shortcuts as per the user.
Shortened Labels: Replace long labels like "Search Medical Wikipedia" with shorter ones like "Wikimed" and "Kiwix".
These shortcuts are added to the context menu only if the toggle is enabled.
This ensures a cleaner menu and respects the user’s .
Image

@ayush1009208
Copy link

Helo @akshitsgn i am facing problems while ssetting up the project can you plz help
Image
the errors are like this

@ayush1009208
Copy link

CC @Popolechien

@akshitsgn
Copy link

@Popolechien can i start working on this issue.

@MohitMaliFtechiz
Copy link
Collaborator

@akshitsgn I am assigning this to you, please make a PR with your fix.

@ayush1009208
Copy link

@akshitsgn at least you can tell why my project is not setting up...I will take another issue

@MohitMaliFtechiz
Copy link
Collaborator

@akshitsgn at least you can tell why my project is not setting up...I will take another issue

@ayush1009208 Which version of Android Studio, and JDK you are using for compiling the project?

@viditpawar0
Copy link

There actually dosen't seem to be a way to enable/disable this feature on user demand. Because to achieve this, we will need to dynamically enable/disable an intent filter in the AndroidManifest.xml which is not possible in android. But some manufacturers like Samsung do provide this functionality to enable/disable apps that shows up in such context menus. The only certain way is to enable or disable this feature entirely.

@akshitsgn
Copy link

See using the SharedPreferences to store the user's preferences regarding which features or activities should be enabled or disabled at runtime, we can enable/disable the corresponding activities.

PackageManager.setComponentEnabledSetting().This approach provides a simple and user-friendly way to let users control features without modifying the AndroidManifest.xml or restarting the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants