XVoice++ is an Xposed module that allows you to use standard SMS apps to send and receive messages through Google Voice. When this module is activated, any outgoing SMS messages will be rerouted through Google Voice, and any messages that are received by the Google Voice app will be displayed in SMS apps.
This module is a fork of runnirr's original XVoicePlus (XVoice+) module, which is an Xposed implementation of CyanogenMod's VoicePlus. I renamed this module XVoice++ to highlight the difference, although the naming scheme of XVoicePlus is the same.
The XVoicePlusService runs on startup and listens for an OUTGOING_SMS so that it knows when a message is being sent. Cyanogenmod made this a system-wide intent (NEW_OUTGOING_SMS), but it is not available on all other ROMs. Instead, the module hooks SmsManager to catch the outgoing message and send the OUTGOING_SMS intent instead.
Once XVoicePlusService receives the intent, it sends the message using HTTP calls to the legacy Google Voice website.
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 receiver works 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 have an incoming Google Voice message, we broadcast an INCOMING_VOICE intent to the XVoicePlusService. The service then handles the message and broadcasts a system wide RECEIVED_SMS intent that is used by all SMS applications.
Starting with v5.0, the Google Voice app was completely rewritten, and now uses Google Cloud Messaging for push notifications. The module hooks the GCMListenerService to catch the message as it comes in, and broadcasts an INCOMING_VOICE intent to the XVoicePlusService.
Copyright © 2017 Behind The Math
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.