android-developer-assistant icon indicating copy to clipboard operation
android-developer-assistant copied to clipboard

Question: possible to add more ways to trigger the app to scan current UI?

Open AndroidDeveloperLB opened this issue 1 year ago • 12 comments

Sadly Google removed the way to trigger the assistant via long pressing the home key, and I don't want to use power key for something that's not related to power.

Is there a way to trigger the scanning ? I don't think I ever saw such an API, sadly... Maybe possible to use accessibility to simulate it?

AndroidDeveloperLB avatar Jan 11 '25 01:01 AndroidDeveloperLB

Hi, I'm guessing a bit what can be the case on Your device, but this may help: If You use gestures, or when the long press on the home button invokes the Google on-screen search, while You are sure, the Developer Assistant app is set correctly, then try to swipe from the bottom left corner of the screen.

jwisniewski avatar Jan 13 '25 20:01 jwisniewski

@jwisniewski I don't use gestures. I use buttons navigation. Long pressing the home key doesn't use the current assistant app. Only the "circle to search". Even if I disable the assistant, it will show up.

AndroidDeveloperLB avatar Jan 13 '25 21:01 AndroidDeveloperLB

@AndroidDeveloperLB even without the gestures, and with the "circle to search" occupying the long press on home button, you should be able to invoke the active assist app, via swipe gesture, from the bottom left corner of the screen to the center.

Are you able to try? Or too late? App removed? ;)

jwisniewski avatar Jan 13 '25 21:01 jwisniewski

@jwisniewski Why would it matter if the app was removed? I can install it again. I even bought it.

I already explained I use buttons navigation. Not gesture navigation. There is no gesture for buttons navigation to reach the current assistant app. There is actually not even a single gesture there, at all. Only things that are possible is long pressing home key to reach circle-to-search feature, and long pressing on power button (which I made as power options, because that's how I want it to be) to reach assistant.

Here, watch me trying every gesture I can think of:

1.zip

AndroidDeveloperLB avatar Jan 13 '25 21:01 AndroidDeveloperLB

I see, my answer may be related exclusively to Samsung devices, I don't have any pixel at hand at the moment.

My answer is related to the "Assistant app" visible on the Step 3 screenshot here: https://www.samsung.com/latin_en/support/mobile-devices/how-to-use-the-circle-to-search-feature-on-the-galaxy-s24/

Even with classic 3 navigation buttons, and with circle to search, at last on Samsung devices, there is a possibility to use a gesture to invoke the digital assistant / assist app.

jwisniewski avatar Jan 13 '25 22:01 jwisniewski

@jwisniewski The circle-to-search is working, as I've shown on the video, but it's not related to the assistant. Even if I would disable the assistant, it would still be triggered.

Anyway, back to the topic: Is it possible to add more ways to trigger the app's scanning of the current screen? Maybe using accessibility? Which API could do it?

AndroidDeveloperLB avatar Jan 13 '25 22:01 AndroidDeveloperLB

@AndroidDeveloperLB So... it appears google resolved the issue on Pixels via the long press on the power button, while Samsung with the swipe gesture from the bottom screen corner. I have seen Your video, you would successfully invoke the assistant on Samsung device, the way you have tried.

You can configure Developer Assistant to use a virtual button, displayed over other apps. Open Developer Assistant (traditionally, via the app icon / launcher). If it is set as default assist app, it will present a button SHOW ALTERNATIVES near the center of the screen. Tap it and scroll to the "Virtual assist button".

But to be honest, it is the most intrusive option, if you use the mobile device privately, this option will be rather distracting.

The best option seems to be to use the long press on the power button, on Your device, apologies there is nothing better.

jwisniewski avatar Jan 13 '25 22:01 jwisniewski

@jwisniewski Can you please add more ways though? Maybe via the quick-settings toggle, or a notification? Or maybe using some accessibility to offer it in other ways, perhaps still letting some other button being long-pressed (like long pressing the recent-tasks, for example)?

I don't want something being shown on top forever...

AndroidDeveloperLB avatar Jan 13 '25 22:01 AndroidDeveloperLB

Sadly Google removed the way to trigger the assistant via long pressing the home key, and I don't want to use power key for something that's not related to power.

Is there a way to trigger the scanning ? I don't think I ever saw such an API, sadly... Maybe possible to use accessibility to simulate it?

https://github.com/jwisniewski/android-developer-assistant/issues/21

sajjantimalsina12 avatar Jul 30 '25 10:07 sajjantimalsina12

https://github.com/jwisniewski/android-developer-assistant.wiki.git

sajjantimalsina12 avatar Jul 30 '25 10:07 sajjantimalsina12

To conclude this topic:

Developer Assistant relies on privileges of the assist app, it needs to be invoked as an assistant to have access to required information. There is no other way.

How to activate the "assist app", depends on a vendor of the Android device, also on the Android version itself - nothing I can fix as a developer who just delivers an application to this ecosystem.

Over time I have extended the user interface of the app. Developer Assistant is designed to help a user to setup it correctly. It also helps to understand how to invoke the assist function on his device. This guidance is heuristic, won't work for everyone unfortunatelly.

To handle remain cases, there is also an option to show a virtual button on top of the screen content. This virtual button can be used to invoke the assist function directly, without relying on a long press on the home button and all the other techniques proposed on Android devices over time.

The above is described in the app, search the SHOW ALTERNATIVES button, after the Developer Assistant has been set as the default assist app:

Image

jwisniewski avatar Aug 11 '25 18:08 jwisniewski

@jwisniewski Was it always there? I don't remember it being available. Can you please also add a notification and quick-settings tile option? I don't like having something on top all the time, as it can cause accidental interaction, and it obstruct things.

AndroidDeveloperLB avatar Aug 11 '25 18:08 AndroidDeveloperLB