Question Override hardware keys?

Search This thread

bartito

Inactive Recognized Developer
Dec 1, 2005
3,949
1,790
Battery saver option is disabling background apps.
Noticed your app is using a background service (accessibility service) to receive events from the system.
I can use your app to remap buttons if I enable battery saver?
Thanks

Autoanswer: App also works if battery saver mode enabled
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,949
1,790
I have disabled Samsung Pay app via "pm disable-user com.samsung.android.samsungpay.gear" command and the app isn't launching GPay anymore when I long press the watch down button.
 

Carybus

Member
Oct 28, 2017
10
1
just a note, after installing GW4 Remap (by the way, thanks, it's awesome), I noticed that the watch was making a weird click sound when the display was turned off.

The noise disappeared after a reboot. I just wanted people to know because it took me 2 days to think about rebooting it lol
 
I have disabled Samsung Pay app via "pm disable-user com.samsung.android.samsungpay.gear" command and the app isn't launching GPay anymore when I long press the watch down button.
It works by launching your app if choice over Samsung Pay. That's why it needs accessibility service to detect when it's in the foreground. If you disable Samsung Pay it won't work. I recommend just not activating Samsung Pay but leaving it enabled
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Small update:
    • Added Ultimate Alexa as a predefined target
    • Changed the name to GW4 Remap (Please uninstall the old version manually)
    5
    Moderator Announcement

    I enjoy to see how vivid and helpful the discussion and exchange of experiences in this thread is. However, as quite often when temper overheats for whatever reasons I'd to recognise that one conversation derails into personal attacks. As much as we encourage vivid discussions including off-topic contributions (as long as the OP accepts them) as little we accept and tolerate personal attacks or deviations from the expected member conduct stipulated by rule no. 2 of the XDA Forum Rules.
    2. Member conduct.

    2.1
    Language: XDA is a worldwide community. As a result, what may be OK to say in your part of the world, may not be OK elsewhere. Please don't direct profanity, sexually explicit language or other offensive content toward Members or their work. Conversely, while reading posts from other members, remember that the word you find offensive may not be offensive to the writer. Tolerance is a two-way street.

    2.2 Nudity: XDA is used by people of all ages, including minors. It is unacceptable to post nude or pornographic imagery, which includes the exposure of male or female genitalia and / or female breasts.

    2.3 Flaming / Lack of respect: XDA is about sharing and this does not involve virtual yelling (flaming) or rudeness. Flaming or posting with a lack of respect is unacceptable. Treat new members in the manner in which you would like to have been treated when you were a new member. When dealing with any member, provide them with guidance, advice and instructions when you can, showing them respect and courtesy. Never post in a demanding, argumentative, disrespectful or self-righteous manner.

    2.4 Personal attacks, racial, political and / or religious discussions: XDA is a discussion forum about certain mobile phones. Mobile phones are not racial, political, religious or personally offensive and therefore, none of these types of discussions are permitted on XDA.

    2.5 All members are expected to read and adhere to the XDA rules.
    Statements like "A search engine is your best friend" generally doesn't add any value to a thread. Let's agree that our members do a search before they post, not only because the rules request it but in a very personal interest: They have an issue that they want to solve and to find a solution. I'm convinced it's valid to assume that a search was unsuccessful at the time a thread was created.

    For the above mentioned reasons, I've edited a few posts and deleted a few other ones. Those members who got affected by my action will certainly recognise it. Please do not hesitate to contact me by a personal message in case of any question.

    Last but not least a personal request: If anybody of you recognises a rule violation or feels to be offensively engaged, please only report such a post but do not reply or react to it. Any reply just lights the fire, fuels the rant and ensures that the thread derails. Just let the moderators deal with it from the very first beginning - it also eases our life.

    Thanks for your cooperation! I wish everybody a great weekend. And stay safe and healthy!
    Regards
    Oswald Boelcke
    Senior Moderator
    4
    I've added the ability to define custom rules now.
    Theres also a bunch of predefined applications included (as entering the package/activity names on the watch is a pain):

    As sources:
    • Bixby
    • Samsung Pay
    • Power Menu (this one is using special logic)
    As targets:
    • Google Pay
    • Google Assistant Go
    Please tell me if there's something missing you'd like to see added.

    Screenshot_20220108_163134_watch4payswitch.png
    4
    I haven't done Android stuff for quite some time so I decided to quickly throw something together.
    This doesn't require a connection to the phone.
    Seems to work nicely for now (though I haven't tested actually paying with it yet)

    Source and instructions are available here:
    3
    i found these in logcat entries, this is what happens when the back button is long pressed

    screenshot.png


    i don't have samsung pay in my country so long pressing is useless. maybe someone could implement a listener for this AKEY_EVENT_FLAG_LONG_PRESS thing and have it do something else