Hi, I've already posted this question in Q&A section, maybe it's a programming question...
I am looking for a way to modify hard key behavior to launch apps I chose. I have a USB keyboard connected, some keys are already mapped to Music, Video, Camera etc. I would like to be able to launch my own applications of my choice. It's not a phone, it's an Android run mediaplayer.
I have sort of solved this issue by running an .sh script from command line which gets keyboard events using getevent utility and then launches apps using am start command, but this method is slow! It takes 2-5 seconds to launch an app like that, whereas "soft-wired" hard keys work instantly.
Does anyone know which part of Android OS is responsible for this setting? There's gotta be a settings file or something. I can change hard key behavior by changing /system/usr/keylayout/*.kl files, but I cannot change the apps they launch. Only default audio player, camera, etc etc. I know it's not the launcher, because I can switch around launchers, but hard keys are the same.
Please! Someone's gotta know how it works? Is it compiled into the linux core?
Related
There are all of these app's out there that allow you to control your computer from your phone (using VNC and others). This is all well and good....but there are no shortcuts to do anything on these apps. Whatever you are trying to do on your computer takes way too many screens/clicks to be truly efficient by using your phone. You most certainly are able to do it with your phone.....but hell...it was way more complicated than it had to be.
**DOES BELOW APP EXIST?**
I would LOVE to just touch a shortcut on my home screen that would send a couple of keystrokes to my computer. Or telling my computer to open a particular program from a shortcut created on my android phones Home screen. This would be amazing. I could tell my computer to run whatever task from my phone QUICKLY...without having to jump hoops through screenshots/mouseclicks/keyboard on VNC app's......
Using this, you would no longer need all these separate video/music player control apps...you could just wire hotkeys/scripts to be run to control ANYTHING. I could send a keystroke to minimize/maximize a window....pause iTunes....Give a song 3 star rating....open a particular site...
I'm just trying to turn my phone into a much better remote for my computer.....all current apps seem to fail horribly.
Hi,
I was looking for the same thing and came a cross a neat application to run on computer, AutoHotKey ( http://www.autohotkey.com/ ). Then I use MultiRemote to send keystrokes (like a hotkey, CTRL+P), programmed as one button in that program. Then on the computer side I have a script that knows what to do when that button is pushed Really powerful application with tons of features to program in the scripts...
BR
jmelhus
Hey guys, I'm fairly new to android applications. I am specifically working on an android application that runs for the Notion Ink Adam. A guy by the name of Mr.Guy actually wrote the app nearly perfectly and provided the source to me but there is a small issue I want to work out, hopefully with some help.
Basically the app runs from a search button long press, runs a native linux command (which toggles the backlight on and off) and closes.
The problem with the current application is that if you have somethings open in a current window they are closed by this application running. An example is opening the app drawer on the homescreen. Running the application closes the app drawer. In some cases th interruption makes a greater difference like when viewing media.
Anyway heres the source, ftp://eto.homeip.net/Shared/NotionInkHacks/PQiToggle.zip
I think I need the application to run a service instead of an activity but this didn't seem to matter. I'm pritty sure I need it to not call a UI and just run the service.
An ideal fix for this is to skip the application and just rely on keycodes run from init.rc but trying to do this I had zero success. I'm not sure if the version of init in my rom supports keycodes.
If you could help me either with making it a service or allowing a native linux command run from keycodes I would greatly appreciate it. Thanks!!!
You can call a service directly from a broadcast receiver which can listen for the "on search long press" intent
http://developer.android.com/guide/topics/fundamentals.html#ActivatingComponents
http://developer.android.com/reference/android/content/BroadcastReceiver.html
I've been trying for hours now to do the simplest thing. I need some way to make a shortcut to these apps that is its own standalone APK. Here's why:
The long version: I have a Logitech Harmony Hub. It won't launch apps on the Nexus Player directly, but I have a workaround that involves installing Multilanguage Keymap Redefiner on the Nexus Player, and sending a keyboard command that I've mapped to trigger a specific app. For example, sending F1 launches Netflix. This works flawlessly for just about every app, but the exceptions are Google's own apps (Google Play Music and Google Play Movies). When I map a key to launch one of these two apps, nothing happens.
The short version: My Harmony Hub won't launch them directly.
Here's what I've tried so far:
Attempt: Creating an app with Tasker on my phone that launches the app in question. Basically cloning the app.
Result: This works on my phone to launch it, but once I install the app on the Nexus Player, it does nothing. Perhaps the Android TV version of the app is different from the phone version in such a way that it won't allow this to work.
Attempt: Installing Tasker on the Nexus Player so I could attempt the same steps as above, but from the Nexus Player
Result: Can't install Tasker - no way to accept the disclaimer on Android TV because it's not visible (accessibility settings don't help)
Attempt: Backing up Tasker on my phone using Helium, then installing Helium to restore a backup of Tasker that has already accepted the disclaimer.
Result: Tasker won't back up with Helium. It just creates an empty .json file. Everything else seems to back up fine, of course...
Attempt: Installing TV App Repo, and creating a shortcut to the apps in question
Result: unable to create the shortcuts because the apps in question are not downloaded, but are rather preinstalled.
Attempt: used this website: http://atvlauncher.trekgonewild.de/ to try to create an APK from the respective packages.
Result: According to the "apps" section of the Nexus Player settings, the package name for Google Play Music should be com.google.android.music, however, this did not work. Neither did com.google.music, com.android.music, or come.google.android.music.tv. When I say "didn't work," what I mean is that in each case, it said the package was not found. I thought this was odd since I used the same package name as what was shown in the Nexus Player's settings on the first try. If anyone knows the correct package names for these two apps, that may be the solution to the problem.
"Shortcut" apps won't work, because Multilanguage Keymap Redefiner will let you map commands to launch apps, but not shortcuts. Needs to be a standalone app. If anyone knows any other method besides the one I've proposed that will launch the apps in question with a single key press, I'd love to hear it. I know this is an obscure request, but it seems so simple and I'm really frustrated at this point. Not the type to give up at something like this, there's got to be a way, but I can't find it. As a side not, my Nexus Player is not rooted, and I'd really prefer not to go that route if there is any other option. Thanks in advance.
:crying: :crying: :crying:
I have a JY-UM135N2PX5 and I want to change the default music and video apps, I dont really want to replace them as much as change them
Im not sure what music player I want right now but I want VLC as the default video player so that when I change the source it will be the media players I use rather than the built-in ones
The navi button has this option but I cannot find any way to do this with the media apps
I tried setting the default in android thinking that maybe it cycled the default android apps but that didnt seem to work however I used an older app so Im not sure if that has anything to do with it as it seemed to have compatibility issues with the version of android I have
stonedhippiecomputerdude said:
I have a JY-UM135N2PX5 and I want to change the default music and video apps, I dont really want to replace them as much as change them
Im not sure what music player I want right now but I want VLC as the default video player so that when I change the source it will be the media players I use rather than the built-in ones
The navi button has this option but I cannot find any way to do this with the media apps
I tried setting the default in android thinking that maybe it cycled the default android apps but that didnt seem to work however I used an older app so Im not sure if that has anything to do with it as it seemed to have compatibility issues with the version of android I have
Click to expand...
Click to collapse
You need Xposed with XFytTweaker.
(and maybe)
I was working on a "poor mans" solution that didn't require Xposed. It does this by replacing the radio, media, dvd and video app with identical apps (with regard to internal package name) that check a setting for a configured app. So for example the media app is com.syu.music, and that one is started from the main server apk. My replacement apk is also com.syu.music (a reason why I need to replace them) and checks for a setting which program to start.
The internal config of my apps is 100% correct and it works on my phone and on any emulator, but not on the Joyings (yet). I assume it is something with signing, but on a different level. As if there is an extra check inside the main server (Sofiaserver.apk or 000000000_com.syu.ms.apk).
If I get it to work, they simply install from my JET apk and can be configured via my JET apk. Of course they only work for apps assigned to the units hardware buttons, or that are somehow started from the main server apk. For the time being I stopped it though. I thought it was quite easy to achieve, but it is not.
And Xposed/XFytTweaker is so much more flexible.
surfer63 said:
You need Xposed with XFytTweaker.
(and maybe)
I was working on a "poor mans" solution that didn't require Xposed. It does this by replacing the radio, media, dvd and video app with identical apps (with regard to internal package name) that check a setting for a configured app. So for example the media app is com.syu.music, and that one is started from the main server apk. My replacement apk is also com.syu.music (a reason why I need to replace them) and checks for a setting which program to start.
The internal config of my apps is 100% correct and it works on my phone and on any emulator, but not on the Joyings (yet). I assume it is something with signing, but on a different level. As if there is an extra check inside the main server (Sofiaserver.apk or 000000000_com.syu.ms.apk).
If I get it to work, they simply install from my JET apk and can be configured via my JET apk. Of course they only work for apps assigned to the units hardware buttons, or that are somehow started from the main server apk. For the time being I stopped it though. I thought it was quite easy to achieve, but it is not.
And Xposed/XFytTweaker is so much more flexible.
Click to expand...
Click to collapse
I have both but I wasn't aware you could do that with xfyttweaker I know you can reprogram the hardware keys but Im looking just to switch the media apps I want the rest, would I need to readd the stock apps and just add my own media players instead of the stock ones or can I choose which ones I want to replace, I looked around a little in xfyttweaker but it wouldnt do what I wanted which was to get rid of that stupid floating button, I thought it was hardcoded but I found a setting to turn it off and found out its called touch assistant I had been all through the settings to learn what I could do with the head unit and set it the way I want but I didnt realize what touch assistant was I thought it was some kind of enhancer for the touchscreen
I'm not sure of the reason, but the touch screen of my Yotaphone 2's e-ink stopped working. The e-ink screen itself visualises what it is supposed to, but it doesn't react to touches. The LED screen is OK. I thought this may be a software problem, so I did a factory reset that would probably eliminate it. It didn't, and the problem that I have now is that I can't even use the LED screen, because at startup it runs the tutorial, and the tutorial requires you to interact with the e-ink screen, which, in my case, is impossible, because it is not responsive to touches. So I never get to the "desktop" and the app launcher - the tutorial has to be completed. If I slide from the top rim I can get into Settings. I've tried stopping the process from the list of active apps, but it doesn't work. Anyone has an idea what to do?
I have the same issue yesterday and couldn't find a way to bypass the tutorial. As you I tried to kill the process via adb and didn't work. I also thought that there might be a place in the phone where the app checks to see if it has been run as it only runs the first time.
Two things to try:
1. Do you have the folder /data/data/com.yotadevices.yotaphone2.tutorial ? I see this in my phone so maybe it is created as a check. The folder is empty, you can try to create it as root to see if this bypasses?
2. Send the events via adb sendevent to the /dev/input/event4 or via input tap. You will need to calculate the coordinates somehow.
Good luck!
jaboto said:
I have the same issue yesterday and couldn't find a way to bypass the tutorial. As you I tried to kill the process via adb and didn't work. I also thought that there might be a place in the phone where the app checks to see if it has been run as it only runs the first time.
Two things to try:
1. Do you have the folder /data/data/com.yotadevices.yotaphone2.tutorial ? I see this in my phone so maybe it is created as a check. The folder is empty, you can try to create it as root to see if this bypasses?
2. Send the events via adb sendevent to the /dev/input/event4 or via input tap. You will need to calculate the coordinates somehow.
Good luck!
Click to expand...
Click to collapse
There was nothing I could do about it, but I found a workaround which would at least let me use the phone somehow. From the bottom side you can launch Google search and search for a popular android app, which will take you to the Play store. From then I installed Sidebar Lite by Mohammad Adib (probably other sidebar launchers would also work) and then the sidebar launcher works on top of the Tutorial and you can dock several apps in there.