[MOD] PS4 Remote Play native gamepad support - Android Apps and Games

I'm working on native gamepad support for the ported PS4 Remote Play app (see original thread). Unfortunately I don't have access to my PS4 for the next month, so I'm hoping to get help testing from users with access to the Sixaxis Controller app, a PS4, and the ability to send me logcat output.
I will be working on touchpad, accelerometer and gyroscope support for the DualShock 4 controller in coming days, however these will require the Sixaxis Controller app once complete.
BETA 5 Change log:
- Fixed support for DualShock 4 controllers connected without Sixaxis Controller app.

Here is a log file.

ysargon said:
Here is a log file.
Click to expand...
Click to collapse
Thanks for that. Very useful!
I think I've figured it out. Can you try the attached version and try connecting a controller in the Sixaxis Controller app. Make sure you don't have any touch profile active, and that you have 'Preferences->Gamepad Settings->Enable Gamepad' checked. If it works, it will only be the digital buttons at this stage. Let me know how you go!

sir_earl said:
Thanks for that. Very useful!
I think I've figured it out. Can you try the attached version and try connecting a controller in the Sixaxis Controller app. Make sure you don't have any touch profile active, and that you have 'Preferences->Gamepad Settings->Enable Gamepad' checked. If it works, it will only be the digital buttons at this stage. Let me know how you go!
Click to expand...
Click to collapse
Remote play force closes just before it connects to ps4. Ps4 did turn on, says that i connected on ps4. Just the app itself keeps crashing. I attached another log hopefully it helps

ysargon said:
Remote play force closes just before it connects to ps4. Ps4 did turn on, says that i connected on ps4. Just the app itself keeps crashing. I attached another log hopefully it helps
Click to expand...
Click to collapse
I did something dumb. How about this version...

Also, don't forget logcat output if it fails to work.

sir_earl, thanks for your work! This will make a huge difference in the performance of remote play. The main issue I currently have is that the on screen overlay controls will fade away if no touch is detected in a second or so which requires double touches to perform the intended action from time to time.
I'll test this out.

Ditto, sounds like the right solution. Need to check this out now!! :cyclops:

Here's my logcat after running test 5. No problems as far as force closing. Ran just like normal.
I had my ds4 connected via your app with native gamepad support on. Nothing happened at all in the logcat when I pressed buttons on the ds4. Not sure if it was supposed to. Haha.
Thanks for your work!

TheLeapist said:
Here's my logcat after running test 5. No problems as far as force closing. Ran just like normal.
I had my ds4 connected via your app with native gamepad support on. Nothing happened at all in the logcat when I pressed buttons on the ds4. Not sure if it was supposed to. Haha.
Thanks for your work!
Click to expand...
Click to collapse
I can report the same thing with v5. Nothing in logcat when pressing any of the DS4 buttons. Looking forward to further testing

If there's no output, then something is trapping the key events. Might be the on-screen controls, so I've done a build that hopefully won't show the overlays (if they're still showing, let me know and I'll take another look).

sir_earl said:
If there's no output, then something is trapping the key events. Might be the on-screen controls, so I've done a build that hopefully won't show the overlays (if they're still showing, let me know and I'll take another look).
Click to expand...
Click to collapse
still shows let me know if you need a logcat.

ysargon said:
still shows let me know if you need a logcat.
Click to expand...
Click to collapse
Likewise

I feel more confident about this version! The last one actually should have worked if I had built it correctly. Fortunately I was able to bring up the correct activity so I could test the key events without a PS4 connected, so this one should work.

sir_earl said:
I feel more confident about this version! The last one actually should have worked if I had built it correctly. Fortunately I was able to bring up the correct activity so I could test the key events without a PS4 connected, so this one should work.
Click to expand...
Click to collapse
Downloaded and installed. I will test when I get home. Do I need sixaxis app to test this version?
Sent from my SGP561 using XDA Premium HD app

Gamepad works with v7, but button mapping is wrong. I can't do logcat right now, but hopefully someone else can provide a proper log. Great work so far!

Thanks great news! Does this mean that we can use Stock Android gamepad compatible controllers with our Phones? e.g. using sixaxis enabler in cases where ppl like myself do not have a rooted phone?

As reported it works except square is switched with x, and triangle and circle are switched. R2 and L2 don't work at all. The left stick just acts as if it is the dpad and the right one doesn't work. Share button also does nothing, but options works perfectly. Another obvious problem is the playstation button brings you to the phone's home screen automatically. I'm guessing you were aware of a lot of these but I just wanted to make sure.
Oh and I went to do a logcat nothing at all shows up when I do "| grep RemotePlay" and so I tried doing a regular logcat and there was nothing about remote play in that either. Shrug.

TheLeapist said:
As reported it works except square is switched with x, and triangle and circle are switched. R2 and L2 don't work at all. The left stick just acts as if it is the dpad and the right one doesn't work. Share button also does nothing, but options works perfectly. Another obvious problem is the playstation button brings you to the phone's home screen automatically. I'm guessing you were aware of a lot of these but I just wanted to make sure.
Click to expand...
Click to collapse
Great news. I'll be able to address most of these issues fairly easily now. Unfortunately most (all?) Android devices map the PS button to the home key (this is based on a system configuration file), so the PS button can't be captured by apps. I could add a custom fix for the Sixaxis controller app, but we'll get to that last - you've still got on-screen controls.
Also, some devices will map square, X, triangle and cirle differently, so this could be problematic. Sixaxis controller allows you to change these mappings under 'Preferences->Gamepad Settings->Edit Mappings.
I will add analog sticks and L2 / R2 in the next build.
If anyone can try native gamepads that don't use the Sixaxis app (i.e. controllers with OTG cable) and report their results, that would be helpful too.

Hi otg with sixaxis enabler is how I'm testing it. So far so good only tried out resogun as only had a min but sticks and o / x def working!

Related

[Q] 3 button headphone controller

Hey all,
Has anyone successfully been able to use a 3 button headset controller? The center button works fine for me, but the other two don't which is kind of annoying. I've tried all the apps in the market and none of them report the button pressing event. Is that something I can monitor on the terminal?
I'm using rooted stock. Haven't tried out other mods yet but I am looking forward to doing that soon. Would this be mod dependent?
Thanks.
Tray player pro.
Sent from my SAMSUNG-SGH-I997 using XDA App
no, it is an android limitation. it doesn't work. it is single button only
but ther eis an app somewhere that can use jestures with that single button to do different things and works with all the music apps. forgot the name though. not what you are looking for but maybe a good alternative.
Ok, thanks! I'll just use one of the market apps to do 1-button combos.

[APP][2.3.3+] MOGA Universal Driver

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Use your PowerA MOGA with any application!
Provides full functionality for the PowerA MOGA™ Pocket and Pro controllers.
This application includes both a Virtual Keyboard that should work on all devices and a Gamepad Mode that provides full gamepad functionality for rooted devices.
NOTE: Only supports one controller at a time!
Features:
* Virtual Keyboard
* Virtual Gamepad
* Customizable profiles so you can make it work just right with your game or emulator
* Exportable profiles
* MOGA device management
* Button to stop Pivot services (Root users only, non-root get taken to the Settings application to do it manually, sorry!)
* Two Home-screen widgets:
** Small toggle widget
** Long toggle widget with profile switcher
Virtual Keyboard Features:
* Does not require root
* Usable by any application that listens for keyboard input
* Customizable!
Virtual Gamepad Features:
* Acts like a full Gamepad
* Toggle the analog joysticks between digital and analog output depending on your needs
* Customizable!
Usage:
1. Select your device:
I'm going to assume you haven't already paired your controller with your phone. Skip to the end of the section if you've already got it paired.
Make sure Bluetooth is enabled before continuing!
Select the "Manage Controllers" button found at the top of the Settings application. You will see an empty list of paired controllers.
Power on your Pocket or, if you have a Pro, turn it on into Mode A. Select "Add Controller" at the bottom of the screen. Your phone will start scanning for controllers and will add only MOGA devices to the list as it finds them. Once the scan completes select the controller you wish to pair with and click the "Select" button. It will begin the pairing process with your controller and you will most likely see a dialog pop up that asks you to confirm a PIN. Accept the PIN and the "Add Controller" screen will close, dropping you back to the "Manage Devices" screen. Click back once more unless you wish to repeat this step to add another controller.
2. Running in Virtual Keyboard mode:
This is the default mode for the driver but does require a few steps to configure.
Scrolling down to the "Driver Mode" section on the main screen you'll see that the current mode for the driver is "Virtual Keyboard" (unless you've already changed it to Gamepad, in which case switch back to Virtual Keyboard to follow these instructions). Click on the "Configure Virtual Keyboards" button to be taken directly to the appropriate Settings screen to turn on the "MOGA Virtual Keyboard" this cannot be done automatically for security reasons which are explained when you turn on the MOGA Virtual Keyboard. After you've enabled it go back to the driver's Settings screen and click "Select Virtual Keyboard". This will pop up the system dialog to let you choose which keyboard you want to be the active one. This also cannot be done automatically, sorry!
Finally toggle the button next to "Enable Driver" to turn on the driver. You'll see a MOGA icon appear in your notifications bar indicating the status of the driver: white for disconnected, green for connected.
If you'd like to configure a profile scroll down to the "Configuring a Profile" section below!
3. Running in Virtual Gamepad mode:
Before you continue: you must have a rooted device with SuperUser installed in order to use the Virtual Gamepad mode. The button to enable the Virtual Gamepad is disabled if your device does not support SuperUser.
Virtual Gamepad mode is significantly easier to configure. First, click on the "Switch" button next to the current mode which will pop up a dialog box explaining the two available modes. Feel free to read these before continuing. Select Gamepad from the list and you've successfully configured Gamepad mode!
All you have to do next is enable the driver by toggling the "Enable Driver" button just as you would in the Virtual Keyboard mode.
4. Configuring a Profile:
The profile system was entirely rewritten in 3.0 to make the process easier and to provide the ability to share profiles with friends. If you scroll down to the bottom of the settings page you'll see the "Profiles" section with a couple of buttons. Clicking "Switch" will popup a dialog containing all of the valid profiles for the current controller type and driver mode (for example, you cannot use a MOGA Pocket profile that was configured for Virtual Keyboard mode on a MOGA Pro in Gamepad mode, with any variation therein).
Selecting "Manage Profiles" will bring you to a list similar to the "Manage Controllers" screen. Here you can create new profiles, rename them, delete them, or reload them from the SD card if you've added new ones onto your SD card while the program was running.
Click "Create Profile" to begin. You will first be prompted with a dialog that asks for the name of the profile. Enter what you'd like and click OK. You will then be presented with the default configuration for that profile. You can modify any of the mappings by clicking on the "Change" buttons associated with each input. When you click "Change" a dialog box will appear with a sorted list of output types. Select a type and then select the button you wish to map to that input. Changes are saved when you leave the edit page.
If you are running in Virtual Gamepad mode you will have a few more options available to you. You can decide whether or not the Analog inputs (including the DPad) should send Analog outputs or standard Button outputs. The list will automatically update when you toggle the analog mode so scroll down afterwards to configure the outputs. Gamepad mode will not present you with a list of categories as the options are much more limited. Since it is pretending to be a controller it can only send controller messages to the system. For any analog input you will only be allowed to map analog outputs and for buttons, only button outputs.
After creating a profile click the "Switch" button to select your profile and activate it!
Profiles are automatically saved to "/sdcard/MOGA/IME" for Virtual Keyboard mode and "/sdcard/MOGA/System" for Virtual Gamepad mode.
Troubleshooting:
Lots of users have reported that the driver does not properly connect on certain devices (I'm noticing most are Samsung TouchWiz-enabled devices). I am still actively investigating this and will hopefully be able to resolve it sooner rather than later!
* Make sure that the Pivot is NOT running when you run my driver! It will connect to the controller and prevent my driver from connecting. There is a button at the bottom of the settings screen that will help you ensure Pivot isn't running.
* If you turn on your MOGA Pocket and the light immediately turns green then turn it off and back on until the blue light blinks consistently. I've noticed on my own that this happens almost every time I turn it on after a long period of not using the controller.
* Some users have reported that disabling WiFi has allowed them to connect their controllers.
* There is a bit of voodoo that one user found that helped them connect to their controller on a Samsung device:
jjprophet said:
I was having the same problem on my Note 2 also. The only way I've been able to connect to this MOGA Universal Driver app is by connecting first to the MOGA Pivot app then starting the Universal Driver and then turning my phones screen off for about a second then turning it back on. For whatever reason after turning my screen back on it instantly connects to the Universal Driver app.
Click to expand...
Click to collapse
Download:
Google Play
This product is not affiliated with, nor authorized, endorsed or licensed in any way by Bensussen Deutsch and Associates, Inc., its affiliates or subsidiaries. All trademarks are property of their respective holders.
Buy me a soda!
Changelog:
3.1:
Brought back the widgets!
New, long widget: change profiles from your desktop
Fixed a few more crashes reported by users. Keep 'em coming -- but hopefully not!
3.0.3:
Rewrote connection code. Works on my devices that previously didn't. Please try!
Fixed "Enable Bluetooth" bug where it was out-of-sync with Bluetooth Adapter state
Added dialog when enabling driver to warn you if Pivot is detected to be running
Fixed Pivot detection and stopping code to include all Pivot packages
Moved SuperUser check from Application to Settings Activity to prevent it from popping up all the time
3.0.2:
Added Spacebar and the Numpad numbers to the Virtual Keyboard mappable keys
Fixed some crashes users had reported
Removed old WAKE_LOCK permission
Fixed "Stop Pivot Services" button
3.0.1:
Fixed crash on older devices due to a typo when discovery started
Fixed Left stick's Right being mapped to DpadUp by default (Pocket)
Fixed Left/Right shoulder buttons being flipped (Pro/Pocket)
3.0:
Completely rewritten!
Supports MOGA Pro
Profiles are saved as XML files on the SD card for easy sharing
2.2:
Fixed crash (So sorry for the broken update!)
2.1:
Added System Service toggle widget
Split Analog/DPad toggle into two options to have one DPad one Analog
2.0:
Completely rewritten to improve lag time.
System-mode added.
Analog support now available in System-mode.
Analog can be toggled to allow DPAD use.
Notification icons change according to connection status.
1.1:
KeyEvents are now broadcast as JOYSTICK and GAMEPAD sources.
1.0:
First release!
Great work on the app, thank you very much!
Is there anyway to get the device to present itself as a generic gamepad, similar to a dualshock and the six axis app?
I could send KeyEvents as a Gamepad and Joystick source but I don't know if that's what you're talking about. Whenever I've used gamepads on my devices they always come in through KeyDown and GenericMotion events.
Awesome work man, Ive done a little testing so far. Works great with Sonic CD, and Mame4Droid, but i cant get it to work in Gameboid for some reason, probably the same in the other iod emulators, haven't tested those yet. so far hasn't worked in any of the other android native games ive tried. will continue my tests.
Thwiipp said:
Awesome work man, Ive done a little testing so far. Works great with Sonic CD, and Mame4Droid, but i cant get it to work in Gameboid for some reason, probably the same in the other iod emulators, haven't tested those yet. so far hasn't worked in any of the other android native games ive tried. will continue my tests.
Click to expand...
Click to collapse
I tried it on SNESoid and GameBoid and in both cases I needed to enable "Use Input Method" in the "Other Settings" menu in order for it to work. It would appear that the emulators don't listen to soft-key events if this is off.
ObsidianX said:
I could send KeyEvents as a Gamepad and Joystick source but I don't know if that's what you're talking about. Whenever I've used gamepads on my devices they always come in through KeyDown and GenericMotion events.
Click to expand...
Click to collapse
Sort of, yes. I tried the updated version of the app (think you for putting it out there) but it wasn't quite what I was trying to describe.
This is what I'm after and the only real example I have to describe what I'm talking about.
If you use the sixaxis app has an option in it to "Enable Gamepad: Android will see controllers as native gamepads."
When this option is enabled, games like Dead Trigger will give you an in-game menu to map the controller buttons.
Again, thank you VERY much for your work on this. As is, it makes the MOGA useable!
---------- Post added at 05:12 PM ---------- Previous post was at 05:04 PM ----------
ObsidianX said:
I could send KeyEvents as a Gamepad and Joystick source but I don't know if that's what you're talking about. Whenever I've used gamepads on my devices they always come in through KeyDown and GenericMotion events.
Click to expand...
Click to collapse
Sort of, yes. I tried the updated version of the app (thank you for putting it out there) but it wasn't quite what I was trying to describe.
This is what I'm after and the only real example I have to describe what I'm talking about.
If you use the sixaxis app has an option in it to "Enable Gamepad: Android will see controllers as native gamepads."
When this option is enabled, games like Dead Trigger will give you an in-game menu to map the controller buttons.
Again, thank you VERY much for your work on this. As is, it makes the MOGA useable!
If there's anything I can do to help (screenshots, testing, etc) please don't hesitate to ask.
I download this app but did not work on my device, any idea's?
Thanks for the feedback!
I did some more reading and found that the Android framework provides absolutely no way to simulate analog input for normal applications. System applications are allowed to send Touch and Trackball events but not the GenericMotionEvent that gamepads send for analog inputs, and even if it did I'm not a system application. The only way to make it work is to elevate the driver to superuser status and start messing with the system directly. This works out well for what e4xda is asking for too because I will be forced to make the device act as a system-level joystick in order to get the analog inputs working.
What I'm planning on doing is having a toggle for which mode to run the driver in, IME or Gamepad. IME mode will be what you see now. In Gamepad mode the user will have to grant the driver root access (which restricts this mode to rooted devices) so it can broadcast inputs directly to the kernel. A nice side-effect of using it in Gamepad mode would mean you wouldn't have to switch your IME back and forth whenever you wanted to use the MOGA.
Anywho, sorry for getting technical. It's partly for you to stay in the loop and for me to formalize what's in my head
2mato said:
I download this app but did not work on my device, any idea's?
Click to expand...
Click to collapse
I'm afraid I can't really help you out without more info. When you say it doesn't work what exactly do you mean?
In its current form the driver is kind of a song and dance to get going. You'll need to enable it in the system Keyboard and Language settings and then switch to the MOGA IME (which can be done inside the IME settings page). After that you need to configure the IME by selecting which device it should connect to. If you haven't already paired the device you can do that from the settings page. Once you've selected a device go ahead and leave the IME settings page and it should try and connect to your device. Make sure your MOGA is turned on and wait for the light on the PowerA button to turn Green. This will take 5 - 10 seconds on average.
Sometimes my MOGA will turn green immediately for some reason when turning it on even though the phone hasn't connected to it. In those cases just power cycle the MOGA until it connects properly to your phone.
ObsidianX said:
Thanks for the feedback!
.........)
Click to expand...
Click to collapse
I think you nailed it. I just checked SuperUser and I have allowed Sixaxis superuser access - that must be why.
Key Mappings
Where is the option to map the buttons to regular letters? Because I can't get gameboid to recognize the buttons.
I'm interested in purchasing a MOGA controller, is the clip adjustable for any phone? I have an EVO LTE with an Otterbox case, I'm hoping it'll fit.
12gage said:
I'm interested in purchasing a MOGA controller, is the clip adjustable for any phone? I have an EVO LTE with an Otterbox case, I'm hoping it'll fit.
Click to expand...
Click to collapse
The clip is adjustable. It can fit a Galaxy Note 2, so i think you should be fine.
Thwiipp said:
The clip is adjustable. It can fit a Galaxy Note 2, so i think you should be fine.
Click to expand...
Click to collapse
Thank you, I'm getting one!!
doorgoo said:
Where is the option to map the buttons to regular letters? Because I can't get gameboid to recognize the buttons.
Click to expand...
Click to collapse
I was able to get Gameboid to use the default GamePad buttons (BUTTON_A, BUTTON_B, etc) by enabling "Use Input Method" in Gameboid's "Other Settings " page. It would appear that the code is written to listen for physical input events unless virtual events are enabled.
The emulators are targeted for an Android version prior to Gamepad support so in the UI it'll say [unknown] for everything other than the DPAD inputs but that's just a display name. It's still recording the new keycodes internally and properly listening for them.
ObsidianX said:
Thanks for the feedback!
I did some more reading and found that the Android framework provides absolutely no way to simulate analog input for normal applications. System applications are allowed to send Touch and Trackball events but not the GenericMotionEvent that gamepads send for analog inputs, and even if it did I'm not a system application. The only way to make it work is to elevate the driver to superuser status and start messing with the system directly. This works out well for what e4xda is asking for too because I will be forced to make the device act as a system-level joystick in order to get the analog inputs working.
What I'm planning on doing is having a toggle for which mode to run the driver in, IME or Gamepad. IME mode will be what you see now. In Gamepad mode the user will have to grant the driver root access (which restricts this mode to rooted devices) so it can broadcast inputs directly to the kernel. A nice side-effect of using it in Gamepad mode would mean you wouldn't have to switch your IME back and forth whenever you wanted to use the MOGA.
Anywho, sorry for getting technical. It's partly for you to stay in the loop and for me to formalize what's in my head
Click to expand...
Click to collapse
Please do enable analog support for rooted phones! I tried using the stock MOGA app to run Nova 3, and the software is horrible! Sometimes it runs fine, but over half the time there's a 2+ second delay from when I push a button to the action actually occurring... and I know it's not my phone or the controller, since the touch screen controls work perfectly and the controller responds quickly when using your app (rather than the stock app) for different games.
Thanks so much for putting this out quickly
ObsidianX said:
Thanks for the feedback!
I did some more reading and found that the Android framework provides absolutely no way to simulate analog input for normal applications. System applications are allowed to send Touch and Trackball events but not the GenericMotionEvent that gamepads send for analog inputs, and even if it did I'm not a system application. The only way to make it work is to elevate the driver to superuser status and start messing with the system directly. This works out well for what e4xda is asking for too because I will be forced to make the device act as a system-level joystick in order to get the analog inputs working.
What I'm planning on doing is having a toggle for which mode to run the driver in, IME or Gamepad. IME mode will be what you see now. In Gamepad mode the user will have to grant the driver root access (which restricts this mode to rooted devices) so it can broadcast inputs directly to the kernel. A nice side-effect of using it in Gamepad mode would mean you wouldn't have to switch your IME back and forth whenever you wanted to use the MOGA.
Anywho, sorry for getting technical. It's partly for you to stay in the loop and for me to formalize what's in my head
Click to expand...
Click to collapse
That'd be awesome. It definitely needs to be easier to use this controller... Thanks for your hard work.
Lhockey said:
Please do enable analog support for rooted phones! I tried using the stock MOGA app to run Nova 3, and the software is horrible! Sometimes it runs fine, but over half the time there's a 2+ second delay from when I push a button to the action actually occurring... and I know it's not my phone or the controller, since the touch screen controls work perfectly and the controller responds quickly when using your app (rather than the stock app) for different games.
Thanks so much for putting this out quickly
Click to expand...
Click to collapse
Why IS there such a delay? It can't be due to connection type, cause Bluetooth keyboards/mice do not lag as much as MOGA. Even with Moga Universal Driver app (of ObsidianX), the response seems rather slow, which makes playing even Super Mario on NES emulators hard...
The lag is probably because of how many hops each button press has to go through before it finally reaches the game code.
1. Press button
2. bluetooth signal created/sent
3. signal received and parsed by the kernel
4. forwarded to the Android framework
5. passed up (not sure how many times) to the application layer
6. a service running inside the MOGA IME reads the data and parses it into booleans
7. an intent is fired off for each button INDIVIDUALLY back to the system
8. android takes the intent and determines if there's anything that can handle it (this might lose time just based on priority)
9. the MOGA IME intent receiver accepts the intent
10. the intent is parsed and the single button is extracted
11. the receiver then triggers the IME activity to send the running activity a key event
[end driver hops]
12. the game receives an onKeyDown/onKeyUp event and sends it along through its own pipeline before finally being executed as an action
REPEAT!
Now, this is how the BlueZ-IME project has set things up. Looking around at various IME projects though this is what they all do. I have no idea how long each step actually takes in the system or if any of it is handled more graciously by the Android framework. Conversely some steps might have lower priority and get pushed back by a few cycles adding to the delay. I'll probably go back after my current task and combine all the button presses into a single intent which should hopefully speed things up.
Using the kernel-level mode would replace steps 7 throuh 11 with a single command that writes the state to the kernel driver. One thing I would like to find out is whether or not most people have the file "/dev/uinput" or "/dev/input/uinput" or "/dev/misc/uinput" on their devices. This is my point of entry for the kernel-level mode and must exist. I use CM10 on my phone so my device isn't a good common denominator. If anybody who's reading this thread has an older device with Gingerbread still running on it I'd love to hear if you have it on yours as well.
quite a number of steps there! your app is the best thing about moga (cause I find myself using the controller with games outside the Pivot app), and gets me very close to actually enjoying the experience. thanks again!

Satechi BT MediaRemote Bluetooth Multi-Media Remote Control

I found something interesting on the Amazon store I thought I would share, I found this is incredibly useful for me so hopefully is to someone else.
this should work on pretty much any Android device but I'm posting it here as it is the only one I can/have tested it on.
I cannot post links yet but it can be found on Amazon UK under the name "Satechi BT MediaRemote Bluetooth Multi-Media Remote Control"
It's a small Bluetooth remote for iPad/iPhone/Mac and very quietly mentions Android so I decided to buy one and see how it goes as I needed something like it for my car.
Anyway it arrived this morning and I love it, I've successfully used it and I've been able to remap keys using the "External Keyboard Helper Pro" app by "Apedroid" which allows remapping of keys to media keys or launching apps.
All keys on the remote can be remapped except the wireless symbol which un-pairs and goes into discover mode.
My requirements were a remote that allows me to change tracks while driving but it also got Google now working in my car Bluetooth system. (it did not connect properly when I launched it via car voice controls)
I have now got the keyboard button remapped to switch to the maps app and the mute button to launch Google now so once Google now is done I have a button to go back to the navigation screen .
I have also been fairly successful in getting this to work with Tasker however it required a small workaround by exporting the task as an app (via Tasker App Factory) and then using "External Keyboard Helper Pro" to launch it.
My only issue with the remote at the moment is that it connects as a hardware keyboard meaning I cannot type while using it (obviously not an issue in the car though)
All this was done on a non rooted Nexus 4 on 4.4.2 so root is not required by the way.
If anyone has any questions feel free to ask, I'm going to figure out how I can bind the other 9 keys on the remote
Oh and finally if you do use the app in question and use Tasker I'd recommend exporting a Tasker task which launches the intent "android.intent.action.VOICE_COMMAND" rather than using the built in voice control key setting.
Dude!! I have totally been looking for this! I like playing podcasts from my phone while I'm working in the garage, so I hook the phone up to my stereo but whenever I need to pause it or adjust the volume, I gotta go clean up or slide out from under the car... This will be perfect!! I'm totally ordering this right now!! Thanks brother (or sister?)!!
Sent from my Nexus 7 using Tapatalk
Cazomino05 said:
...
Click to expand...
Click to collapse
Seems very good indeed.
http://www.amazon.com/gp/product/B00DY9UFB8/ref=cm_cd_asin_lnk
http://www.satechi.net/index.php/satechi-bluetooth-remote-control-for-android
Could you please check if there are any answer call buttons or microphones on this thing? Personally I hope not because it happens so easy in your pocket.

Setting up SixAxxis on shield

Rooted 2.2.1 update 5.01 lolipop running TWRP, not that it matters.
I'm having some trouble running my ps4 controller as an input. I purchased sixassis app, correctly paired it. I just can't seem to get it to work properly. I tried grid gaming, but got ****ed up trying to play borderlands and put in my name for the character. Didn't even make it in-game because things were acting so weird. It would zoom in the screen, bring up this status bar that says keyboard / zoomin-zoomout and get stuck there no matter what buttons I pushed.
It didn't work in that zombie game dead* (can't remember). After installing sixasssis, it started force closing, even when the controller wasn't connected. It would try downloading new update then crash.
How do I setup sixassis app for grid? I'm pretty sure there's something wonky with it trying to emulate a pad and keystrokes at the same time..
Any help would be appreciated. I dropped cash for a new ps4 controller and can't get the damn thing working right.
Im not sure if this will work for you but what I did was Open the Sixaxis Controller App then go into Menu -> Preferences . Once in there click "Gamepad Settings" and check the box next to "Enable Gamepad". Once I did this I was able to play Batman with the controller. No issues =] (also side note, i have a Dualshock 3 controller but should work the same for a Dualshock 4? I think ? )

[App][Alpha] PX5 Media Controller

Hi there,
As you might have read on the PX5 board threads, I was struggling with the ease of use of the stock FM Radio app when driving. If you don't have to SWC you first have to press home from navigating, and open the radio app, or use the widgets, to switch channels. I didn't like that like, so I started to inspect the radio and radio widget .apk files. In there I found some pieces of code that remotely allow to control the FM Radio app.
What my app does is 'listen' to the information the stock FM Radio app is outputting. It can get the current frequency and channel. It shows this information on a notification on your HU. This notification also consists of three buttons to go to the previous channel, the next channel, and turn of the radio.
The current frequency and channel are also pushed to the Android Media Session with media button support. This means other apps (like AnyAutoAudio) or widgets can display the currently playing frequency and channel. You can also control the radio with the media buttons Android support. USB keyboards or BT devices that support these buttons should work! I haven't tested it, but this also means the FM Radio can be used in Android Auto. As soon as you open another media app (like Poweramp), that app will take over the media buttons (as expected). If you want to switch back to FM just press the power button on the notification and you're back.
This app is at an early stage right now. I'd like to see it as a proof of concept. It currently only works with FM. It can't show AM information yet. I am not an Android developer, so it might contain a few bugs and glitches. Let me know if you find anything.
I made a little video a few days ago when I had my first proof of concept working. This video does not display the media button support. Watch it here: https://youtu.be/JNUAi0KNGmM
Let me know what you think! Ideas and suggestions are always welcome.
Download: https://gerbenbol.com/android/com.gerbenbol.hctradiocontroller.apk
So I gave this ago, it seems like it's nearly there for Android Auto. AnyAndroidAuto does pick it up and displays what station is on but AndroidAutos next/pause/previous buttons do not effect it. Also if I change radio station the widget in AndroidAuto does not update to reflect this. Any idea why this is?
That's too bad.
Does the info in the notification change when you switch channel? The media session which feeds info widgets etc. seem to be a bit flaky right now.
Do you have any other media widgets that show the current playing media?
edit: @Dec64, gave it a try this morning. My widgets didn't make it control, or had the latest station displayed, but the native Android media buttons worked fine. Very strange... Do you happen to know what commands AnyAndroidAuto send? It should work for the next/previous/pause buttons. I'll see if I can make some changes today.
Bose321 said:
That's too bad.
Does the info in the notification change when you switch channel? The media session which feeds info widgets etc. seem to be a bit flaky right now.
Do you have any other media widgets that show the current playing media?
edit: @Dec64, gave it a try this morning. My widgets didn't make it control, or had the latest station displayed, but the native Android media buttons worked fine. Very strange... Do you happen to know what commands AnyAndroidAuto send? It should work for the next/previous/pause buttons. I'll see if I can make some changes today.
Click to expand...
Click to collapse
Yeah the info in the notification changed, and worked perfectly just didn't feed that information down to AA. I had no other media widgets at that time.
No unfortunately I don't know what commands are sent. What is weirder still is this morning on my way to work, after about 20mins the HU turned off the radio and changed menus in AA to the music menu and said nothing is playing...Yet i touched nothing. I put the radio back on and after 5mins it turned back off and I was sent to the phone menu. The only thing new running was your widget, very odd, I dont know how that is even possible.
Dec64 said:
Yeah the info in the notification changed, and worked perfectly just didn't feed that information down to AA. I had no other media widgets at that time.
No unfortunately I don't know what commands are sent. What is weirder still is this morning on my way to work, after about 20mins the HU turned off the radio and changed menus in AA to the music menu and said nothing is playing...Yet i touched nothing. I put the radio back on and after 5mins it turned back off and I was sent to the phone menu. The only thing new running was your widget, very odd, I dont know how that is even possible.
Click to expand...
Click to collapse
Weird! I've rewritten a load of code, and it should be more stable now. I'm testing on an Android Emulator and and simulate some information the FM Radio would send, so I hope it's better now!
You can download the .apk again from the same URL in the first post. Let me know how it works on the HU. I'm gonna test it when I get home tonight.
Bose321 said:
Weird! I've rewritten a load of code, and it should be more stable now. I'm testing on an Android Emulator and and simulate some information the FM Radio would send, so I hope it's better now!
You can download the .apk again from the same URL in the first post. Let me know how it works on the HU. I'm gonna test it when I get home tonight.
Click to expand...
Click to collapse
Sweet, ill give it ago in 30mins on the way back from work.
@Bose321 Perfect, works 100% better now, reports, shows station changes when I use SWC to do so, shows a stop button now though instead of pause/next track on the AA widget, and the stop button does nothing, but for AA integration it works
this is encouraging.
can you help me with something mate:
i need to turn radio on/off via tasker.. do you think there is a way to do that.. i saw you do that via your app
Nomader0 said:
this is encouraging.
can you help me with something mate:
i need to turn radio on/off via tasker.. do you think there is a way to do that.. i saw you do that via your app
Click to expand...
Click to collapse
You can user tasker or f1x's mtcdtools to do that, there's an intent to close the radio app.
intent action: com.microntek.finish
intent parameters: {"class":"com.microntek.radio"}
Dec64 said:
Sweet, ill give it ago in 30mins on the way back from work.
@Bose321 Perfect, works 100% better now, reports, shows station changes when I use SWC to do so, shows a stop button now though instead of pause/next track on the AA widget, and the stop button does nothing, but for AA integration it works
Click to expand...
Click to collapse
Can you show the AA interface? Not sure why there only is a stop button now, and why it doesn't work. I'll have to dig around in the code to see what causes that.
edit: I think I already know why there only is a stop button right now! Gonna push out a fix tomorrow! I also think why the stop button doesn't work. I only listen to the pause/play button, not the stop button. Thanks for testing, this is useful!
Nomader0 said:
this is encouraging.
can you help me with something mate:
i need to turn radio on/off via tasker.. do you think there is a way to do that.. i saw you do that via your app
Click to expand...
Click to collapse
I use the intent "hct.radio.power.switch" to turn the radio on or off. This is different from the intent Dec64 posted. Mine only turns off the radio, it doesn't shut down the radio app. So use what fits the most.
Bose321 said:
Can you show the AA interface? Not sure why there only is a stop button now, and why it doesn't work. I'll have to dig around in the code to see what causes that.
edit: I think I already know why there only is a stop button right now! Gonna push out a fix tomorrow! I also think why the stop button doesn't work. I only listen to the pause/play button, not the stop button. Thanks for testing, this is useful!
I use the intent "hct.radio.power.switch" to turn the radio on or off. This is different from the intent Dec64 posted. Mine only turns off the radio, it doesn't shut down the radio app. So use what fits the most.
Click to expand...
Click to collapse
Thanks for your answers..
Which intent turns on the radio?
Maybe Com.microntek.radio.power?
Nomader0 said:
Thanks for your answers..
Which intent turns on the radio?
Click to expand...
Click to collapse
I use the same one. It's a toggle. Send it once to turn it off, send it again to turn it back on.
Bose321 said:
I use the same one. It's a toggle. Send it once to turn it off, send it again to turn it back on.
Click to expand...
Click to collapse
Thanks mate I will try that.
Dec64 said:
Sweet, ill give it ago in 30mins on the way back from work.
@Bose321 Perfect, works 100% better now, reports, shows station changes when I use SWC to do so, shows a stop button now though instead of pause/next track on the AA widget, and the stop button does nothing, but for AA integration it works
Click to expand...
Click to collapse
Can you give it another try? I've updated the link in the first post again. Should now show next/previous/play-pause buttons if I'm right!
Tried the version of yesterday in my car, and it works a lot better for sure!
Are you liking Android Auto on the HU? Is it fast? I'm hoping Sygic is able to build the navigation for AA soon, I don't like Google Maps for offline navigation. Are you always connected via your phone or something, or have you downloaded parts of maps?
Bose321 said:
Can you give it another try? I've updated the link in the first post again. Should now show next/previous/play-pause buttons if I'm right!
Tried the version of yesterday in my car, and it works a lot better for sure!
Are you liking Android Auto on the HU? Is it fast? I'm hoping Sygic is able to build the navigation for AA soon, I don't like Google Maps for offline navigation. Are you always connected via your phone or something, or have you downloaded parts of maps?
Click to expand...
Click to collapse
I will try it on the way home from work again.
I like AA on my HU because it displays the info i need quickly and at all times, but the major draw backs where the radio not showing, and the phone menu not working properly.
I dislike google maps and prefer waze for the police/speed camera warnings as i drive a bit...spirited...but waze integration isn't working yet unless you have an AA specific HU. It also doesnt display speed limits/cameras.
Yeah I have 30gb of tethering on my phone so always connected using tasker to start tethering when BT is connected
tried updated app. Next/previous/stop now show on widget but do not work in AA, everything else works perfectly
Dec64 said:
tried updated app. Next/previous/stop now show on widget but do not work in AA, everything else works perfectly
Click to expand...
Click to collapse
Weird! I'll see if I can get AA on a device to test this. At least the right buttons are now showing. It's a start... :laugh:
Seems to be different from other widgets, because the ones I use seem to work fine (Ubiquity Music Widget).
Dec64 said:
tried updated app. Next/previous/stop now show on widget but do not work in AA, everything else works perfectly
Click to expand...
Click to collapse
same issue just tested today...
aarick said:
same issue just tested today...
Click to expand...
Click to collapse
Thanks for testing. I'll have to look into that. Can you try the native media buttons?
Just turned rds on my radio and noticed the widget doesn't pick station name or rds info. It would be amazing if it could and report that info?
Dec64 said:
Just turned rds on my radio and noticed the widget doesn't pick station name or rds info. It would be amazing if it could and report that info?
Click to expand...
Click to collapse
I've been looking into that, but I believe the radio app doesn't 'share' that information. But I'll have another look.
But first gotta look into the AA issue.
What I did notice on my own HU, as soon as the Radio app starts, the sound goes on, and directly off again at boot. Did any of you notice that?

Categories

Resources