Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,979 Members 46,593 Now Online
XDA Developers Android and Mobile Development Forum

[Xposed][ICS+] XVoicePlus - Voice+ with Xposed

Tip us?
 
runnirr
Old
(Last edited by runnirr; 11th June 2014 at 02:06 AM.)
#1  
Senior Member - OP
Thanks Meter 176
Posts: 274
Join Date: Mar 2011
Location: Seattle
Default [Xposed][ICS+] XVoicePlus - Voice+ with Xposed

So this is my first post releasing anything so hopefully this goes well.
Introduction
I exclusively use Google Voice for texting but find the features of other sms apps to be much better than the Google Voice apps. It seems other do as well since it is built into Cyanogenmod now. I decided to go back to stock and missed the option of using other sms apps with Google Voice. This is based largely off the Voice+ module from Cyanogenmod, but implements its own hooks to know when an sms message is being sent, or Google Voice message is being received.

Installation
  • Install Google Voice from the play store if you don't have it already
  • Install the XVoice+ apk from the downloads section at the end of this post
  • Enable XVoice+ in Xposed
  • Run the XVoice+ app and select your Google Voice account
  • Disable "Text Notifications" in the Google Voice app settings to avoid double notifications
  • Reboot your phone to enable the Xposed module
Note: It my take a few minutes after rebooting before your messages start showing in your sms app of choice. A toast will show when the service is up and running.

On a tablet
I don't have a modern tablet but @Link_of_Hyrule put together a small guide about how he got it working.
https://plus.google.com/102556815242...ts/YyFVaTQrPmi
http://forum.xda-developers.com/show...&postcount=606

How it works
Sending
The VoicePlusService runs on startup and listens for a NEW_OUTGOING_SMS so that it knows when a message is being sent. Cyanogenmod made this a system-wide intent, but it is not available on all other roms. Instead, I made my own intent.
I hook all outgoing sms messages through the SmsManager and stops them from being sent. Instead I send my custom NEW_OUTGING_SMS intent that is picked up by the OutgoingSmsReceiver which then starts the VoicePlusService. The handling of sending the message via Google Voice is the same logic used in the Cyanogenmod app.
Receiving
Receiving message is done by hooking into the Google Voice app's PushNotificationReceiver. This means that we know of the message as soon as the Google Voice app does. Conveniently, this notification happens even when notifications in Google Voice are turned off, so you don't need to briefly see the Google Voice notification, have it disappear, and then see the sms notification.
Once we see we have an incoming Google Voice message, we broadcast another custom intent that is picked up by a IncomingVoiceReceiver which starts the VoicePlusService.The service then handles the message and broadcasts a system wide RECEIVED_SMS intent that is used by all sms applications.

My Testing
I only have a Verizon Galaxy Nexus to test this on. Luckily this can run 4.0.4 through 4.4.x. I'll update this as I get a chance to try new aosp versions.
4.0.4
Using Google Hangouts -
Receiving messages works.
Sending messages works.
Some LG devices reported not working. No fix available

4.1.1
Using Google Hangouts -
Receiving messages works.
Sending messages works.
Some LG devices reported not working. No fix available

4.2.2
Using Google Hangouts -
Receiving messages works.
Sending messages works.

4.3
Using Google Hangouts -
Receiving messages works.
Sending messages works.
Reports of incoming messages crashing apps for TouchWiz phones, No fix available

4.4.2
Using Google Hangouts -
Receiving messages works.
Sending messages works.

Side Effects
Because of the way some system apps are being overwrote, I expect that some things will break.
  • All outoging SMS messages from apps that use the SmsManager will be intercepted and sent via Google Voice. To send via your carrier, select "Disable" within XVoice+
  • The app grants itself permission for BROADCAST_SMS which does not appear in the list of permission since it is a system level permission.
  • The app grants itself WRITE_SMS permisson on 4.4+ so that it can save messages in the sms history

Known Issues
  • Receiving emoji causes apps to crash
  • Receiving long messages causes apps to crash

Source
https://github.com/runnirr/XVoicePlus/

Download
In Xposed repos
http://repo.xposed.info/module/com.runnirr.xvoiceplus
Pre-release build
https://app.box.com/s/44qpj66fgwu59d5aoet6 2.4.2
Attempts to fix duplicate outgoing messages appearing in sms app
https://app.box.com/s/8rdr0civjvqg9fwfza4y 2.4.1
Change to use OrderedBroadcast - fixes Hello SMS and maybe other apps?
Fix for "sent time" of message being off

Old builds
Left for legacy reasons. Shouldn't be needed.
https://app.box.com/s/xq0d9n91jmll0m1sgax5 1.3a

Enjoy and please leave any feedback.
The Following 55 Users Say Thank You to runnirr For This Useful Post: [ Click to Expand ]
 
mauam
Old
#2  
mauam's Avatar
Senior Member
Thanks Meter 6570
Posts: 4,009
Join Date: Jan 2011
Great work, keep up dev
The Following User Says Thank You to mauam For This Useful Post: [ Click to Expand ]
 
aalupatti
Old
#3  
Senior Member
Thanks Meter 416
Posts: 1,902
Join Date: Feb 2011
Was always looking for something like this. Will try it out. Thanks

Sent from my GT-N8013 using Tapatalk
 
runnirr
Old
#4  
Senior Member - OP
Thanks Meter 176
Posts: 274
Join Date: Mar 2011
Location: Seattle
Quote:
Originally Posted by aalupatti View Post
Was always looking for something like this. Will try it out. Thanks

Sent from my GT-N8013 using Tapatalk
No problem. I would be interested in your experience using it (basically if it works for you or not) or other feedback you have.
The Following 2 Users Say Thank You to runnirr For This Useful Post: [ Click to Expand ]
 
SeanA208
Old
(Last edited by SeanA208; 8th January 2014 at 07:08 AM.) Reason: Adding questions
#5  
Junior Member
Thanks Meter 3
Posts: 5
Join Date: Jan 2014
Awesome! I've been looking forward to something like this and I'm installing it right now. I'm running an N5 on 4.4.2. I'll post feedback as I have it.

I had a few questions:

1) Should we keep the Google Voice app installed and running?
2) If so, is the best way to not get dual notifications by disabling notifications via app info for Google Voice or disabling text notifications within the Google Voice app (so as to still get voicemail notifications)? Or maybe something else?


My initial testing looks like this works perfectly (tested with Hangouts and Textra)!
The Following 2 Users Say Thank You to SeanA208 For This Useful Post: [ Click to Expand ]
 
runnirr
Old
#6  
Senior Member - OP
Thanks Meter 176
Posts: 274
Join Date: Mar 2011
Location: Seattle
Quote:
Originally Posted by SeanA208 View Post
Awesome! I've been looking forward to something like this and I'm installing it right now. I'm running an N5 on 4.4.2. I'll post feedback as I have it.

I had a few questions:

1) Should we keep the Google Voice app installed and running?
2) If so, is the best way to not get dual notifications by disabling notifications via app info for Google Voice or disabling text notifications within the Google Voice app (so as to still get voicemail notifications)? Or maybe something else?


My initial testing looks like this works perfectly (tested with Hangouts and Textra)!
1) Yes the google voice app needs to stay installed. I hook into its notifcation system to know when new messages come in.
2) Disabling "Text notifications" in the Google Voice works and is simple. I don't know if there is another way that works. I assume voice mail messages will still come in correctly (I haven't had one since I've been running this)
The Following 2 Users Say Thank You to runnirr For This Useful Post: [ Click to Expand ]
 
chirisu
Old
#7  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Sep 2010
Galaxy note 2 on sprint (sph-l900). My Google voice number is my sprint number.

My problem has always been that messages I send through the web never appear in the stock messaging app. With your module, it's a little better... I can get those messages that I send from the Web on my phone if and only if the recipient replies to the message before I send a message from my phone. For instance, if I send a message via the Web and immediately send another message via the hangouts app, the web message never gets synched to the hangouts app.

Otherwise, this is a fantastic module, something I can use daily. Thanks!
 
ahrion
Old
#8  
ahrion's Avatar
Senior Member
Thanks Meter 195
Posts: 567
Join Date: Jul 2013
I use sliding messaging as it has Google Voice integration but there has always been problems with the way it receives gv sms. Is there any way to help the integration with that....maybe work with the team?

I use my regular text for personal business and the gv text for work. It's all integrated in the same app, Sliding Messaging... But receiving has never really worked properly...

Sent from my LG-E980 using Tapatalk
The Following User Says Thank You to ahrion For This Useful Post: [ Click to Expand ]
 
runnirr
Old
#9  
Senior Member - OP
Thanks Meter 176
Posts: 274
Join Date: Mar 2011
Location: Seattle
Quote:
Originally Posted by chirisu View Post
Galaxy note 2 on sprint (sph-l900). My Google voice number is my sprint number.

My problem has always been that messages I send through the web never appear in the stock messaging app. With your module, it's a little better... I can get those messages that I send from the Web on my phone if and only if the recipient replies to the message before I send a message from my phone. For instance, if I send a message via the Web and immediately send another message via the hangouts app, the web message never gets synched to the hangouts app.

Otherwise, this is a fantastic module, something I can use daily. Thanks!
I was able to reproduce that scenario (without Sprint integration). I'll look into it. This is likely a problem with CyanogenMod's version as well.

Quote:
Originally Posted by ahrion View Post
I use sliding messaging as it has Google Voice integration but there has always been problems with the way it receives gv sms. Is there any way to help the integration with that....maybe work with the team?

I use my regular text for personal business and the gv text for work. It's all integrated in the same app, Sliding Messaging... But receiving has never really worked properly...

Sent from my LG-E980 using Tapatalk
It is possible but it would be out of scope for this module. Also, it looks like Sliding Messaging is a paid app so I won't be looking into it. If another developer is interested in solving this use case, I can provide more information on how this one works.
 
SeanA208
Old
#10  
Junior Member
Thanks Meter 3
Posts: 5
Join Date: Jan 2014
Just as a followup, everything seemed to work fine for a couple hours but I'm currently seeing some issues. Messages aren't sending reliably (some go through, some do not) and texts aren't coming through reliably (i.e. they come in on Google Voice but not in the SMS app). I'm going to reboot and see if the problem persists. The issues could be due to external factors too (and I've been experimenting with switching the default texting app but I can't imagine that's related)

As a side note, is any of the code open source or are you looking for help from other developers? I don't have any experience building Xposed modules but I do have Android experience and have done software development for a long time.

The Following User Says Thank You to SeanA208 For This Useful Post: [ Click to Expand ]
Tags
google voice, voice+, xvoice, xvoice+, xvoiceplus
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes