• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Handling MotionEvents from AccessibilityService

Greetings all,

I am working on an AccessibilityService that takes input from game controllers (PS5 controller, Xbox Controller, etc.), I am using OnKeyEvent() for handling button presses and releases ,however I am having a lot of trouble figuring out how to receive input from the Joysticks.

Generally I would use OnGenericMotionEvent() to handle MotionEvents from the joysticks, but since this is an AccessibilityService and not an Activity, it doesn't seem to have that method.

The MotionEvents I want to handle are as follows: AXIS_X, AXIS_Y, AXIS_Y, AXIS_RZ, AXIS_RY, AXIS_RX, AXIS_HAT_X, AXIS_HAT_Y, AXIS_LTRIGGER, AXIS_RTRIGGER, AXIS_BRAKE, AXIS_GAS

Does anyone here know how I could handle MotionEvents from an AccessibilityService? I've looked at the official docs and codelabs a lot but this has me stumped.

Regards,
0xB01b

Help Can't instal apps!

Thank you puppykickr.

I managed to fix it but in a different way. I'm not sure how I got there but I went into Google Play settings and found 'My Devices' which showed that the device I was looking to fix was unticked. It seemed to me that it was worth ticking that box and then I found that it worked!

So I haven't tried your fix, which may well have fixed it anyway so thanks for the suggestion.

Help ADB Command to show folder sizes

The System Data folder on my Samsung Galaxy S9+ has been growing like a cancer every day for months. I have not been able to figure out the source of the problem, but this ADB command seems like a promising way to see what folders or files in System are taking up all of that space. However, is it true that I'll need to root my phone to use this ADB command on the System folder? I don't need to write anything. I just want to see what files or folders are gigantic since that might give me insight as to what is causing the problem. I don't want to root my phone, so I'm guessing that this ADB command will not help me, but I just wanted to double check. Is there any way to figure out what is taking up all that space in System Data without rooting my phone?
upload_2021-1-31_17-26-33.png

Need an app that stops my screen from turning off

I use this app .... https://play.google.com/store/apps/details?id=com.bhanu.screenonmanager&hl=en_US&gl=US ... it allows you to keep the screen on if a particular app is running. Works fine for me. It obviously does NOT prevent you turning the screen off yourself, just stops it turning off automatically according to the display settings.

Oh, on a Galaxy Note 10 running a rooted Android 10 ROM.

No single-press functionality for side key??

Well no need to guess as that's exactly what I described in my question. The point is the bixby button used to have both single press and double press functionality, and now it's double press or holding press. However they only allow you to remap the double press to anything useful, which means you have to give up the vitally important double tap camera access if you want to remap the bixby button. All this translates to essentially having no options at all with the functionality of this button, whereas if they allowed you to use the single press it could actually be useful.

I guess I shouldn't be surprised the bixby button has always been such a horrible waste of a feature and is the reason I keep asking myself every year why I still buy samsung. Just very annoying that they kind of pretended to finally fix it this year but actually didn't.

Possible to play app sound when minimized?

I know media apps, like music and podcast players, those can play their sound in the background while using other apps. And I wouldn't want a media app that couldn't. However games usually don't play sounds when in background.AFAICT. I'm sure it's something that's set by the developers, when they make their apps. In the case of RuneScape, that would be something the Jagex devs would need to do. Maybe worth you emailing them about it.

Google Calendar No Option for Week or Day view?

Then I also cannot imagine why. I'd suggest trying a different calendar app, clearing data for Google Calendar or uninstalling and reinstalling the Google Calendar (the second 2 on the assumption that there's something screwy about your app, the first as a fallback if all else fails).

I can't imagine what would do this, and Google tend to be very weak in the customisation options for their apps so I wouldn't expect them to let you choose which views it displays (which some calendar apps do), and I cannot see any such option on my copy. So this has to be some very weird bug in your particular copy.

Bixby... Why so irritating?

No, like the Bixby Button it's an actual extra physical button on the side of the phone, dedicated to calling up Assistant. Nokia, Sony, Xiaomi have all added this to some of their phones, probably others too.

I hated being prompted to turn Assistant on by my Pixel if I did any of the things that would trigger it (like lingered on the home button too long) and so I disabled the Google app - now I can leave my finger on the home button as long as I like and will never be asked to activate it. Means that Assistant, Google search widgets and voice search in some Google apps won't work, but actively didn't want the first 2 and never used the third, so for me that was no loss.


So why not just change what the assistant function is?

In fact, you can even select 'none' as a function.

Screenshot_2021-01-31_01-40-25.jpg

Filter

Back
Top Bottom