[Q] Haptic feedback - duration of vibration - Android Software/Hacking General [Developers Only]

Hi,
I am Android newcomer.
With WinMobile could be set somewhere in the Regestry the duration of the vibration of the haptic feedback (eg 20 ms). Where and how can I set for Android. For example. It is at "SwiftKey" possible, of course, only for the program, I would like to keep it for the whole Androidfeedback, I find the vibration that is too long! ...
Greetings
Johannes
PS. Sorry for my poor english

I second this and would even pay for it via paypal or market

I'm researching this exact issue for someone over on Android forums. Has anyone learned if it is possible to change the vibration specs in Android?

For root user, There is a menu in cyanogen menu that allows you to tune the time and pattern you want.
Hope this help.
Accidentally sent from my Nexus S using XDA Premium App

melvinchng said:
For root user, There is a menu in cyanogen menu that allows you to tune the time and pattern you want.
Hope this help.
Accidentally sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
This seems to have been removed in CM9 and I miss the feature.
I really would love to look at this more and I've tried to search the source for the CM7 settings app but I can't find where this setting is implemented. I would love to create a mod for this since it seems CM9 are not implementing a lot of old features.
If someone knows where I could look further to find out how this is achieved I would love a pointer

There is a Play Store app named Vibrate Smart that may have what you seek.

Zoandroid said:
There is a Play Store app named Vibrate Smart that may have what you seek.
Click to expand...
Click to collapse
Thanks for the tip but I'm afraid it doesn't seem to allow me to manually set "ms duration" which is the feature I'm looking for... So still looking for either the correct source for this in CM7 to base it on or any other input that might lead further

Related

[SOLVED] Toggle Wi-fi with Long Press of Search Soft Key?

Hi all,
I would absolutely love to be able to toggle my Android wi-fi connection with a long press of the search soft key. This would be ideal when launching some app that would benefit from a faster connection and would save me returning to the home screen, activating the wi-fi and then returning back to the app.
I've searched everywhere to find an app, or combination of apps (Button Shortcut + something else) that could achieve this but have hit a dead end.
Anyone know of an app that could achieve this?
Alternativily I do have the Android IDE set-up at home, does anyone know how I can hook the long button press (from within all app's) and toggle the wi-fi connection?
Thanks in advance,
Nexus One user (I'm not rooted)
Ok, so I've come to the conclusion there's no apps out there at the moment that will do this so I have started writing my own.
I have successfully hooked the search button and can get a basic activity launched with a long press of the search key from the home screen and within other apps.
All I need now to is to find the code that allows me to enabled/disable wi-fi. Can anyone point me in the direction of a good example?
Thanks, will share my app once its finished!
I now have this working on my Nexus One, needs a couple of tweaks but it's nearly ready to release to the Android Market.
Would anyone care to do a bit of beta testing for me? If so I can PM the apk once it's ready.
Also, if appropriate can a mod please move this into the "Android Apps and Games" forum.
I have now released this to the Market as "In-App Wifi Toggle".
awesome app, thanks for sharing!
raviff said:
awesome app, thanks for sharing!
Click to expand...
Click to collapse
Thanks, glad someone likes it!
Can you tell me what phone and version you're using and what button you're using to activate the app?
I like it. I'm using an N1. I put it on the search soft key.
Works great on my HTC Legend with 2.1 Sense!
Thx!
Sent from my HTC Legend using the XDA mobile application powered by Tapatalk
Very nice... Has anyone tested this on a G1?
I have been using the Toggle WiFi app set to the keyboard shortcut (search-w) but this seems a little more "fluid"...
love it great idea fast easy way to turn wifi on and off
Vermithrax said:
Very nice... Has anyone tested this on a G1?
I have been using the Toggle WiFi app set to the keyboard shortcut (search-w) but this seems a little more "fluid"...
Click to expand...
Click to collapse
I have a friend with a G1 who's been doing some testing for me. The version on the market at present will only work on a short press of the green/call button. The search button on the pull out keyboard doesn't work. Now obviously a short press of the green/call button is normally assigned to shortcut to the phone app and most people won't want to re-assign this and so I have made some adjustments so it will now work on a long press of the green/call button. I will be releasing this update to the market in the next couple of days when I get a moment.
FYI I've just uploaded the new version with the added long press of Call/Green button.
Vary nice app, works as described on HTC Droid Incredible. Like how the systems gives me the choice of Wifi toggle or google search on the long press now. Very nice. Would have paid for it....
Any chance of releasing the source code for us wannabe devs to learn from? I'd love to modify the app to call a specific person on a long search press, as I find the dialer to be the most annoying part of Android.
Hi just downloaded it and works fantastic on my Legend!!
Thank you very much!
lowkee said:
Any chance of releasing the source code for us wannabe devs to learn from? I'd love to modify the app to call a specific person on a long search press, as I find the dialer to be the most annoying part of Android.
Click to expand...
Click to collapse
I will eventually release the source code yes once I've put my website together but not right this minute I'm afraid.
On a seperate note I've been beavering away coding "In-App Bluetooth Toggle". Frankly, its been an absolute slut because I would like the app to work with all versions of Android from 1.5 upwards but the bluetooth API only became available from 2.0. I've been using a complex combination of hacking and reflection to get the pre 2.0 versions working and now have a single app that works on both a v1.6 G1 and v2.1 Nexus One.
Are there any v1.5 (Hero/Moment/Magic/Pulse/CLIQ) users out there willing to do some debug testing for me? I can email you a APK file.
Any help appreciated!
You know what I'd love, it if there was a way to emulate all of the hardware keys, like Menu, Home, Back, etc on the screen rather than by using the hardware keys. Any possibility for something like that using your idea here for Wifi toggle?
thesecondsfade said:
You know what I'd love, it if there was a way to emulate all of the hardware keys, like Menu, Home, Back, etc on the screen rather than by using the hardware keys. Any possibility for something like that using your idea here for Wifi toggle?
Click to expand...
Click to collapse
Would you expect such an emulator to be visible always, in every application? That would seem rather intrusive in my opinion.
Great App. It works good on the HTC Wildfire. The only problem is I(we) don't have a call hardkey, therefore I can either use the wifi or the bluetooth toggle or use the popup menu(which is not very "clean")
Hi!
Can you share how you manage to capture long press on search button by code? It will be greatly appreciate
Thanks in advance!

Change Shoulder Buttons

SOURCE CODE ATTACHED
This is the official thread for the "Change Shoulder Buttons" app.
Compatibility:
At this point it looks like the app fully works for some devices, partially works for others, and not at all for some. Different ROMS may also affect functionality.
I am currently working on a "configuration" option which will allow users to calibrate the app for their specific device.
Update
This app has been updated.
No more restart required.
2.3
1. App is now free!
This app is now free!
Link:
https://market.android.com/details?id=com.hatcyl.android.Change_Shoulder_Buttons
Description:
This app will allow you to use the shoulder buttons (L and R) of the Xperia Play for different functions.
You can use them to:
None: Stops the service. Shoulder buttons will stay at default.
Media: L will be previous and R will be next for media.
Camera: R will be focus and take picture.
Volume: L will be volume up and R will be volume down.
Up/Down: L will be up and R will be down.
Navigate: L will be browser back and R will be browser forward.
Advanced:
Tasker Support! (Kinda)
To change button modes do the following:
Action -> Misc -> Action Intent
Action: "com.hatcyl.android.Change_Shoulder_Buttons.ACTION_CHANGE_MODE"
Extra: "Mode:XXXXX"
See screenshot, no quotes, case sensitive.
Note: The game function of the buttons never get disabled. This app just listens for those buttons and then executes a command.
Coming Soon:
1. Custom Mode
2. Support for more Xperia Play devices / ROMS.
3. Real Tasker Support Way Later
4. Some automation maybe
Please post all questions, comments, bugs, and requests in this thread.
Thank You!
How about assigning the keys for volume control? In book reading Apps, L and R are much more convenient than the volume buttons when I have to flip the page.
A widget for quick mode switching could be nice as well.
Sure I can add that. But remember, a restart is still required.
Widget, probably not ... or maybe later ... im not so good with them.
Sent from my R800x using XDA App
Nice app...but when I set the shoulder buttons for media it keeps skipping and rewinding music when I'm playing a game... Lol.
cutthroat31 said:
Nice app...but when I set the shoulder buttons for media it keeps skipping and rewinding music when I'm playing a game... Lol.
Click to expand...
Click to collapse
You mean because you press L and R right?
Once I figure out how to change the buttons without a restart then we could use something like Tasker to change them based on different conditions. Camera if CAMERA is open, Music only if music app is opened, Game otherwise. Or maybe just manually change them faster.
hatcyl said:
You mean because you press L and R right?
Once I figure out how to change the buttons without a restart then we could use something like Tasker to change them based on different conditions. Camera if CAMERA is open, Music only if music app is opened, Game otherwise. Or maybe just manually change them faster.
Click to expand...
Click to collapse
Yeah it's when I press the L and R.
Oh ok...I'm not too familiar with changing stuff on my Play yet so I'm still learning as I go but great app nonetheless.
hatcyl said:
This is the official thread for the "Change Shoulder Buttons" app.
Why is this app not free?
For every app I sell (this and other apps) I will donate 50% of the PROFITS to other XDA members who have been useful to me.
Link:
https://market.android.com/details?id=com.hatcyl.android.Change_Shoulder_Buttons
Description:
This app will allow you to change the shoulder buttons (L and R) of the Xperia Play.
You can change them to:
Game: Default set up. Buttons will work for games.
Media: L will be previous and R will be next for media.
Camera: L will be FOCUS and R will be CAMERA.
Please post all questions, comments, bugs, and requests in this thread.
Thank You!
*Note: Yes there is a free app (which may not be working right now?) and yes, we all know how to do this mod (Simple file change) and yes, I made this app in a few hours and yes, it can use some more work but, this is like a fund raiser for XDA members. Please don't ask "Why is this not free?"
Click to expand...
Click to collapse
This seems like a paid version for an app that is already free.
https://market.android.com/details?id=seb.button.changer
Same functions, same results.
Yep, there's already a free app by an XDA member.
any way to achive this without restart? Would it work if you assign each button to a separate app (similary to assigning to camera currently I assume and probably restart first time only). The app you assign simply check what is required in an extra config file which can be changed on the fly without need to restart. Is this possible at all or is there a particular limitation how android works with those buttons? Thanks in advance
Leraeniesh said:
This seems like a paid version for an app that is already free.
https://market.android.com/details?id=seb.button.changer
Same functions, same results.
Click to expand...
Click to collapse
zerojay said:
Yep, there's already a free app by an XDA member.
Click to expand...
Click to collapse
Yup, I actually posted that in the OP.
It hasn't been working for some people including me, maybe different models are different.
Anyways, if this app sells at all that developer will be first in the donate list along with the guy who found a way to use the official PSX emulator with custom images.
---------- Post added at 02:09 PM ---------- Previous post was at 02:05 PM ----------
ps3taker said:
any way to achive this without restart? Would it work if you assign each button to a separate app (similary to assigning to camera currently I assume and probably restart first time only). The app you assign simply check what is required in an extra config file which can be changed on the fly without need to restart. Is this possible at all or is there a particular limitation how android works with those buttons? Thanks in advance
Click to expand...
Click to collapse
This is coming soon, it was in the market description but I posted it in the OP.
About your idea, it wouldn't work for two reasons.
1. You can't assign a button to an app (that I know of)
2. You wouldn't want to open an app every time you hit a button (especially when playing a game) it would be too slow.
I am exploring two ideas to get this working.
1. Find what causes those files to be loaded. Find away to restart that and force it to load the files again.
2. A much harder way, but this one will work for sure (I've got a proof of concept but no time yet.)
Thank you for explaining. I look forward to the no reboot version. Page up and down option would be great. Many thanks in advance
Sent from my R800i
Can you add functionality to the default web browser? Like make L be the back button and R be the Forward button?
I really liked that function on my PSP browser (years ago when I used it every so often).
Also, add the functionality to the default Launcher? L for next left screen, R for next right screen. I'm not sure if either of these is even possible, but just throwing some ideas at you!
I'd be down to purchase it if you added either one. Thanks!
typikal82 said:
Also, add the functionality to the default Launcher? L for next left screen, R for next right screen.
Click to expand...
Click to collapse
Take that even further, how about a completely Xperia-Play optimized launcher? ADW is open source if not mistaken.
LegionTHEFecalExcretion said:
Take that even further, how about a completely Xperia-Play optimized launcher? ADW is open source if not mistaken.
Click to expand...
Click to collapse
Ha ha, you guys are trying to change a simple file edit into a full blown alternate OS.
Sorry guys, not happening anytime soon, I still havent been able to change buttons without a restart yet!
Sent from my R800x using XDA App
I'd settle for the web browser L and R function
I will settle for pgdown pgup or even dpadup and down for shoulder buttons as long as they don't overwrite their function implemented already in games, emulators and camera mod apps. There is another post regarding shoulder buttons for ereaders - i'm away from my pc so cannot link - but it recommends another app there too.
Sent from my Sony Tablet S using Tapatalk
Installed this, disabled my buttons!
Axxion said:
Installed this, disabled my buttons!
Click to expand...
Click to collapse
Sorry, the files are different in 2.3.2 vs 2.3.3.
I will disable the app for now. I deserve that 1 star rating for that.
Anyways, download the attached file, extract the file inside and copy it (using any file manager, I use EStrong) to /system/usr/keylayout override any existing file.
Reboot afterwards, this should fix your issue.
Again sorry, I'm bringing the app down for now. I'll almost done with a big update that will not require restarts anyways.
It's alright dude! I fixed it myself, just restored from my backup. Thought you outa know though! Look forward to the no reboot version!!
(p.s. Yours is the only button change app that actually worked...apart from the obvious issue ...so thanks!!)
For anyone who was waiting. App has been updated.
No restart required anymore.
More modes coming soon.
... ...
This app pretty much uses the same approach I am going to use to translate buttons presses into touchscreen presses.

[Q] Volume to control media

I've been searching this forum all day and can't find an answer.I'm trying to set it so that holding my volume rocker will skip tracks when listening to music. Tweaked ROM had this feature, but I was one if the unfortunate that wad having hotboot issues. I'm sure my phone not the ROM, but either way I had to go back to eclipse. I really miss that feature and want to get it back.
Sent from my SCH-I510 using XDA
It takes a number of smali edits. For what it's worth - I plan on putting together a less-modded variant of tweaked (minus music widget and maybe some lockscreens) in the near future, so hopefully those that had problems with tweaked will find more stability with the less-modded spin on it.
Thanks for the quick reply.i figured it was something more complicated then just editing key layout.for what its worth I went back to tweaked. I missed my control and customization. Great rom! Hey do you know how to get swype from eclipse I liked the one touch to bring up corrections and the horizontal word suggestions
Sent from my SCH-I510 using XDA
kintwofan said:
Thanks for the quick reply.i figured it was something more complicated then just editing key layout.for what its worth I went back to tweaked. I missed my control and customization. Great rom! Hey do you know how to get swype from eclipse I liked the one touch to bring up corrections and the horizontal word suggestions
Sent from my SCH-I510 using XDA
Click to expand...
Click to collapse
I could be wrong but that is likely the newer beta version that's out. I'm actually not fully sure the process to go about getting that, but I believe it requires signing up for it in some way. I'm sure someone else more knowledgeable could chime in here
Swype Beta
kintwofan said:
Hey do you know how to get swype from eclipse I liked the one touch to bring up corrections and the horizontal word suggestions
Sent from my SCH-I510 using XDA
Click to expand...
Click to collapse
I concur with dwitheral it sounds like you just need the newest version of swype.. go hurr http://beta.swype.com/android/create/ to sign up for Swype beta. It will send a link to your email where you can download swype-installer.apk or whatever its called, you can do it through your phone so use the email you have linked to your charge. Then it'll give you the usual straight forward installation wizard to choose settings/languages etc.. and Ta Da, just activate it through settings>keyboard and choose it as the input method. Installing it this way will also let you get notifications (if you want) to update the swype keyboard when they patch improvements.

Script Writing

I would like to write a script to make a custom toggle in quick settings open up the power widget. Anyone willing to either help me learn about writing script or to tell me the script to enter to make this magick happen?
Thank you in advance...:beer:
Sent from my Nexus 7 using xda app-developers app
Hi,
It's not with a script that you can do that, but you have multiple solutions:
- Decompile/modifie/recompile the SystemUI.apk and Framework (at least), there is some guides but it's the harder thing (like this for example then edit the quick settings).
The easy way is to use:
- A custom rom that allows quick settings management (see dev section).
- Use an app like Power Toggles or Notification Toggle.
- Use Xposed framework with Xposed modules like Gravity Box.
It depends if you are rooted or not, if you want to flash a custom rom, etc...
I'm sorry, I probably should've mentioned this before hand. I'm currently running slimkat 2.3, which, I don't know if your familiar with. But it has "The Chamber of Secrets", which allows you to basically write a custom shortcut to edit any setting within the build prop. ( Now you should know I'm guessing at its full capabilities because I don't know how to use it and I'm asking for help)
I'm not new to flashing ROMs, kernels or apks, but I've never compiled my own ROM. And I don't really have the capability or need to do so. From what I understand, the chamber of secrets is pretty amazimg , I just want to know how to use it.
Sent from my Nexus 7 using xda app-developers app
mrminor13 said:
I'm sorry, I probably should've mentioned this before hand. I'm currently running slimkat 2.3, which, I don't know if your familiar with. But it has "The Chamber of Secrets", which allows you to basically write a custom shortcut to edit any setting within the build prop. ( Now you should know I'm guessing at its full capabilities because I don't know how to use it and I'm asking for help)
I'm not new to flashing ROMs, kernels or apks, but I've never compiled my own ROM. And I don't really have the capability or need to do so. From what I understand, the chamber of secrets is pretty amazimg , I just want to know how to use it.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Hai. Author here.
I routinely search xda for the chamber to make sure nobody has done anything TOO stupid with it lol.
Anyway.
Power menu isn't in it's capabilities.
However...wrote up a powemenu shortcut for slim shortcuts.
Merged...so will be in the next build.
Jubakuba said:
Hai. Author here.
I routinely search xda for the chamber to make sure nobody has done anything TOO stupid with it lol.
Anyway.
Power menu isn't in it's capabilities.
However...wrote up a powemenu shortcut for slim shortcuts.
Merged...so will be in the next build.
Click to expand...
Click to collapse
Thanks juba. I didn't want to clog up the thread with my ignorance. I would really like to learn though. I tried doing some research on my own last night on the Settings.java file. But not sure what in looking at.
If you could please point me in the right direction to start learning it would be much appreciated. I understand that I could really needs things up if I do the wrong thing. And don't want to do that. However, I'm a pretty competent person and want to learn.
Thank you for all the work you have done for our perfect ROM!
Sent from my Nexus 5 using xda app-developers app
mrminor13 said:
Thanks juba. I didn't want to clog up the thread with my ignorance. I would really like to learn though. I tried doing some research on my own last night on the Settings.java file. But not sure what in looking at.
If you could please point me in the right direction to start learning it would be much appreciated. I understand that I could really needs things up if I do the wrong thing. And don't want to do that. However, I'm a pretty competent person and want to learn.
Thank you for all the work you have done for our perfect ROM!
Sent from my Nexus 5 using xda app-developers app
Click to expand...
Click to collapse
Well.
The settings.java file lists all possible system settings.
For example...
Say I wanted to make a shortcut to turn my status bar clock a different color.
I'd search the file for something that looks like a match...
Like Ctrl+f > "clock"
Next...next...next...etc.
Oh, look. "statusbar_clock_color"
That sounds right.
Add to chamber.
Checkbox? No...that isn't a checkbox setting.
Values?
Here's where it gets tricky.
Check boxes and colors...simple.
Colors: input like it tells you to in the dialog.
-2 means default for us...so you could do red,#ff00aacc,-2
For example...to switch between those three values.
List preferences...
https://github.com/SlimRoms/packages_apps_Settings/blob/kk4.4/res/values/slim_arrays.xml
As you can see...the top bunch is for what looks like led timeout settings...
So if I wanted to change those...
I'd find the setting in settings.java...
Input desired values. Such as 0,2500
Which matches to always on and long.
Thank you. I'm going to be delving into this this weekend.
Sent from my Nexus 5 using xda app-developers app

[Q] controll which app produces sound

Hi, i have a question/problem thats been bugging me for a while and i couldnt find a solution...
I want to be able to listen to music while playing a game/ using an app, now some apps are ok with this and "shut up" the moment you start playing music, but others, such as kingdom rush for example, shut down the music playback the moment you open the app.
Is there a method to controll wich app produces sound? Much like on the pc?
Thats in advance for your help =]
(Also i read some where that the best way to get an answer is not to ask a question but instead provide the wrong answer, so here goes: ANDROID SUCKS BECAUSE THERES NO WAY TO CONTROL WHICH APP PRODUCES SOUBD!! =] )
Hello @Moldat
Firstly, this can be quite easily achieved if you're running a device with Android 4.4.
I'm not sure if "App Ops" is available on lower android versions. But if you're on KitKat, you can simply go into App Ops, scroll through the apps, find you game. And turn off the "Media Volume".
This stops the game from using inbuilt music and sound fx. This means you can keep your music on in the background.
Hope this helped, if you need to ask anything else, please do so.
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
Thanks for the answer kris!
Sadly my device isnt kitkat
Moldat said:
Thanks for the answer kris!
Sadly my device isnt kitkat
Click to expand...
Click to collapse
What android version is it?
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
Its 4.3
Moldat said:
Its 4.3
Click to expand...
Click to collapse
Oh you're in luck mate, go to the play store and search for "App Ops" download and install it. There are many choose the one that you feel like having. And its pretty much the same procedure, scroll lthrough apps and disable the media volume.
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;

Categories

Resources