Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD][HOW-TO] Force enter key inside Hangouts! --- Now an Xposed module!

OP CNexus

13th March 2014, 01:52 AM   |  #1  
CNexus's Avatar
OP Recognized Contributor
Flag /home/cnexus/android
Thanks Meter: 13,756
 
9,062 posts
Join Date:Joined: May 2012
Donate to Me
More
UPDATE: An Xposed module is now available that serves the same function as this mod: HERE

************************************************** ***********


This mod will allow you to force the enter key inside Hangouts:


Before


After



What you need:
  1. apktool/baksmali+smali
  2. Text editor (NOT regular notepad, use something like notepad++)

Now let's get started

Quote:

  1. Decompile Hangouts and navigate to com/google/android/apps/babel/views
  2. Open ComposeMessageView.smali with your text editor
  3. Find the following constructor (search for it..):
    Code:
    .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V
  4. Now find the line that looks like this (should be right at the beginning of the constructor method):
    Code:
    .locals XXX
  5. Now delete the number that comes after "locals" and change it to 6. Final code should be as follows:
    Code:
    .locals 6
  6. Now scroll down until you find code similar or the same as the following (register numbers might be different):
    PHP Code:
        invoke-virtual {v1v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

        
    move-result-object v0

        check
    -cast v0Landroid/widget/EditText
  7. Now add the following code immediately after the chunk above (make sure to change v0 register number as necessary if the EditText object is stored into another register):
    PHP Code:
        invoke-virtual {v0}, Landroid/widget/EditText;->getInputType()I
        
        move
    -result v5
        
        
    const v40x00000050
        
        
    or-int v5v5v4
        
        invoke
    -virtual {v0v5}, Landroid/widget/EditText;->setInputType(I)
  8. That's it! Now recompile Hangouts and move the classes.dex from the new apk (with the modified code) that you just compiled into the original APK, overwriting the original classes.dex
  9. Install and enjoy



Here is my modified apk: http://www.androidfilehost.com/?fid=23329332407579003
Last edited by CNexus; 15th March 2014 at 06:29 PM.
The Following 19 Users Say Thank You to CNexus For This Useful Post: [ View ]
14th March 2014, 01:31 PM   |  #2  
Senior Member
Flag Naples
Thanks Meter: 29
 
269 posts
Join Date:Joined: Dec 2010
More
Mmm, thanks but If you press "Shift", the "Smile button" changes in "Enter button" !
Bye!
! !
The Following 4 Users Say Thank You to lupoalberto12 For This Useful Post: [ View ]
14th March 2014, 01:35 PM   |  #3  
hp420's Avatar
Senior Member
Flag NY
Thanks Meter: 888
 
1,790 posts
Join Date:Joined: Jul 2011
More
Great! Wouldn't it be easier to just upload the apk, though? I'm not against a small amount of editing, but I don't want to do this with every release.
14th March 2014, 01:56 PM   |  #4  
jazzespresso's Avatar
Senior Member
Flag NYC, USA
Thanks Meter: 782
 
1,452 posts
Join Date:Joined: Jul 2012
excellent stuff, but I hate decompile/and then compile app, and a lot of users have no or little knowledge, it would be so wonderful if this hack provided as xposed module, so that all users who wish to add this feature wont be worry about modifying the app itself...
14th March 2014, 02:02 PM   |  #5  
Kryten2k35's Avatar
Recognized Contributor
Flag Bradford
Thanks Meter: 11,444
 
7,571 posts
Join Date:Joined: Jan 2011
Donate to Me
More
This is a how-to, for developers. If you want just an apk, wait for someone to maintain one.
The Following 2 Users Say Thank You to Kryten2k35 For This Useful Post: [ View ]
14th March 2014, 02:23 PM   |  #6  
CNexus's Avatar
OP Recognized Contributor
Flag /home/cnexus/android
Thanks Meter: 13,756
 
9,062 posts
Join Date:Joined: May 2012
Donate to Me
More
Quote:
Originally Posted by lupoalberto12

Mmm, thanks but If you press "Shift", the "Smile button" changes in "Enter button" !
Bye!
! !

Not getting that here.
14th March 2014, 02:24 PM   |  #7  
CNexus's Avatar
OP Recognized Contributor
Flag /home/cnexus/android
Thanks Meter: 13,756
 
9,062 posts
Join Date:Joined: May 2012
Donate to Me
More
Quote:
Originally Posted by jazzespresso

excellent stuff, but I hate decompile/and then compile app, and a lot of users have no or little knowledge, it would be so wonderful if this hack provided as xposed module, so that all users who wish to add this feature wont be worry about modifying the app itself...

I'm working on an xposed module.
The Following 6 Users Say Thank You to CNexus For This Useful Post: [ View ]
14th March 2014, 03:04 PM   |  #8  
bigknowz's Avatar
Senior Member
Flag NYC
Thanks Meter: 262
 
517 posts
Join Date:Joined: Jan 2012
More
Question Color Notification
Quote:
Originally Posted by CNexus

I'm working on an xposed module.

@CNexus, I've put together color notifications for GMail, Calendar, G+ and Hangouts, but for some reason the color png doesn't apply for Hangouts. Any thoughts? Thanks in advance.

Here's the flashable zip for an xxhdpi device:
http://www.mediafire.com/download/xe...O_+_140314.zip
14th March 2014, 03:35 PM   |  #9  
hp420's Avatar
Senior Member
Flag NY
Thanks Meter: 888
 
1,790 posts
Join Date:Joined: Jul 2011
More
Quote:
Originally Posted by Kryten2k35

This is a how-to, for developers. If you want just an apk, wait for someone to maintain one.

no it isn't...it's for modders. what dev would honestly need to know this, with the exception of modding purposes? as i said above, i'm not against editing an apk, and i even requested an apk upload (albeit indirectly)....why do you feel the need to step in?? everything was understood and clearly stated. i'm not starting anything here, but please save modding for times when it's absolutely needed. this is not one of those cases.
14th March 2014, 04:49 PM   |  #10  
arana1's Avatar
Senior Member
Thanks Meter: 19
 
166 posts
Join Date:Joined: Oct 2011
Quote:
Originally Posted by lupoalberto12

Mmm, thanks but If you press "Shift", the "Smile button" changes in "Enter button" !
Bye!
! !

that doesnt work here, maybe has to do with version of keyboard you are using

Post Reply Subscribe to Thread

Tags
force enter key, hangouts, hangouts force enter key, hangouts remove smiley key, hangouts smiley
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes