Git Product home page Git Product logo

fythwonekey's Introduction

Fyt HW OneKey

App to modify the hardware buttons on FYT units (Atoto, Ebilaen, Ekiy, Farcar, Funrover, Idoing, Isudar, Joying, Junsun, Mekede, NaviFly, Sinosmart, T'eyes, Winca, Zhan, etcera) units.
This app does not need root!
It should work on all FYT units running on Android 5.1.1 (Sofia), 6.0.1 (Sofia), 8.0 (PX5), 8.1 (SC9853i) and Android 10.0 (uis7862 and uis8581) (and fake Android 11).

logo

Downloads

The apk can be downloaded from the Releases page.

How does it work?

(Upon install the package installer will probably mention that it can not check the app, so it thinks that it might not be safe to install.That is of course for you to decide ;)
Upon install the app buttons are configured for the apps that are normally started by the button)


Currently there are 4 options to "start something" with the "Call method"

  • by package name
  • by intent (package name / intent)
  • by system call (terminal command(s) or script)
  • by LlamaLab Automate Flow URI (Automate various tasks; Added by giladgd (Gilad S.)

1. Open the "FytHWOneKey" app.

main configurescreen

Select for example the BAND option
configurescreen 2

And click the "Call method"
configurescreen 3


by package name: This is NOT the name of the apk but the internal package name. How do you get this "package name"?

  • Use the "List all Installed apps" option in the main screen of the settings. It shows the app icon, the app name and the package name. This package name is what you need. You can select it and copy & paste it into the field.
  • Search in play.google.com for the app you want to start. Say you want to start the navigation app "Magic Earth" and you have selected that one in the play store (in a browser, not the android app). In the address bar you will then see "https://play.google.com/store/apps/details?id=com.generalmagic.magicearth". The bold part behind the "id=" is your package name.

by intent: Every app has a "launch" intent to start the app. Some apps can also be started with other intents to immediately start a specific function. Google Search can be started with the launch intent, but you can also start it with the Google Voice search option intent. The Google (Search) package name is "com.google.android.googlequicksearchbox", the specific intent for google voice search is "com.google.android.googlequicksearchbox.VoiceSearchActivity". The combined "String to be used" is therefore "com.google.android.googlequicksearchbox/com.google.android.googlequicksearchbox.VoiceSearchActivity". Another example is the Joying Bluetooth apk having intents for the dialer (default launch), the call receiver, the bluetooth streaming, the pairing and a few more.

by system call: A system call can be a direct (linux) command or a shell script or a binary (to do something). = Commands can be a single command as in:

  1. "ls -l > /sdcard/some_file.txt" to capture a directory listing to a file
  2. "input keyevent 3" => Go to the Home screen (of the default launcher)
  3. "am start -a android.intent.action.MAIN -c android.intent.category.HOME" => Go to the Home screen (of the default launcher)
  4. "input keyevent 127" => pause active media player (any media player)
  5. "input key event 126" => (re)start last used media player.
  6. "am start com.syu.radio/com.syu.radio.Launch" => Start the radio app with the default launch intent (or better use "by package name": com.syu.radio; Or use "by intent": com.syu.radio/com.syu.radio.Launch)

by Automate Flow URI: Every Flow in LlamaLab Automate has a URI you can find in its Flow Beginning block.
For example: content://com.llamalab.automate.provider/flows/7/statements/1.

If you want to start one Flow on a short button press and a different Flow on a long button press, you can set the value to be the short press Flow URI, followed by a new line with the maximum time to wait for a second button press in milliseconds, followed by a new line with the long press Flow URI.

For example:

content://com.llamalab.automate.provider/flows/7/statements/1
2000
content://com.llamalab.automate.provider/flows/8/statements/1

When you press the button the app will wait 2000 milliseconds (2 seconds) and then start the Flow URI content://com.llamalab.automate.provider/flows/7/statements/1.
If another button press is detected before the 2000 milliseconds are up, the app will then immediately start the Flow URI content://com.llamalab.automate.provider/flows/8/statements/1 instead.

If you remove the time from the configuration, the app will show you a toast of how much time has passed since the first button press, which should help you measure how much time is considered a long press for the particular button in your car. You should try to set this value to be as low as you can, so a short button press won't be delayed too much.

For example:

content://com.llamalab.automate.provider/flows/7/statements/1

content://com.llamalab.automate.provider/flows/8/statements/1

When you press the button nothing will happen.
When another button press is detected, the app will show a toast of how much time has passed since the first button press and trigger the long press Automate Flow.

Starting an Automate Flow URI can be used to trigger Siri on CarPlay, since long pressing the dashboard button on the bottom left side of the screen triggers Siri, so you can setup an Automate flow to long press this button on the screen for you.

2. Exit the app. This is important otherwise the key capture does not work correctly!

3. Press the hardware button on your unit.

4. The first time you press the hardware button, for example the Media button, it will present you with 2 options: Complete action using "Music Player" or "FYT HW OneKey Media button". If you select the second option, you will get the option "Just Once" and "Always".

First time push of hardware button
selectonceoralways
If it functions correctly you can select the next time for "Always".
To undo this "standard action/opening", go to Settings -> App Settings. Select the app which now has that default action/opening and reset the "app standard (opening) values" (has a slightly different name on the several Android versions and implementations).

Deviations from Standard Functionality

Configure the EQ button
If you have a unit with hardware buttons, this EQ button is pretty useless for everyday operation. So I made it possible to assign a "Media Key Event" to it, if you don't want to use it for assigning an app to it (default option). This means you can assign next/previous/play/pause/toggle-playpause to it. Especially on a car without steering wheel keys and with hardware buttons on the unit this is really helpful (that is: to me in my car with my unit)
The ACC_OFF and ACC_ON broadcast events (Only for Android 7 or Android lower versions)
Experimental and partly untested !!
This "should" allow for actions to be performed when the contact is switched on or off.
Acc off should work for media player action, wifi off action (not necessary) and assigned package name.
Acc On does certainly not work on Android 8.x and higher as it is not allowed anymore to use that as broadcast event if not a system signed app.


The list installed apps screen
(To be able to select your app by its internal package name)
selectonceoralways
You can select and copy the "Package Name" into the Settings field of the button you want to re-assign.

fythwonekey's People

Contributors

giladgd avatar hvdwolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fythwonekey's Issues

Xtrons Qualcomm

Hello,

Any change that this works for xtrons head units with Qualcomm 665? For example, IQ92MTVL.

Thank you.

Shell command from other buttons (T'eyes CC3) ?

Hi, your app is a true gift from God, I had no possibility to open carplay from one of these buttons, thanks to you now I can.

But I still have one last thing to figure out, when I press the voice button (setup as EQ button)l, it opens the voice assistant of teyes that is good for nothing. Is there a way to instead of opening the teyes voice application this key calls the siri function of the Carlink 2.0 application? I don’t know the keys this application is able to recognize but it seems weird that the voice control buttons are not detectable but others like play/pause and next/previous are working

thanks

Mode carrousel cannot change radio app UIS7862

Using v1.4.0 on my Navifly/Mekede UIS7862, the mode carrousel only changes between radio and the app configured for "BT Phone option" in FytHWOneKey. All other apps configured in the carrousel are ignored, it only switches between radio and the configured BT Phone option.

If I had to guess what is wrong, it would be that the carrousel now also includes the radio app, which FytHWOneKey does not have a configuration setting for. FytHWOneKey does come up as an option when switching, but even when set as default the stock Radio still opens. When the radio opens the carrousel resets its position back to the beginning and the cycle of configured "BT Phone" to Radio repeats.

Issue Calling Command

Trying to run a simple play/pause command “input keyevent 126” but no response.

The command works as expected through Terminal.
I get the initial verification screen to use FYT HW as the trigger for the button, I confirm, but then no reaction.
Are there permissions missing?

6CF957E5-613D-4D9B-A46D-8F86D9990B4F
B2E0E52A-5515-4E30-868B-1D2790FB2C50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.