751206a
Unify phone number normalization with Quicksy
Click to expand commit body
Uses phone location and libphonenumber to normalize.
Stephen Paul Weber
created
d375262
Passing through initializing -> inititalized -> dialling more stable
Click to expand commit body
Rather than starting right at dialling, which seemed to cause sometimes delays
in the in call screen appearing and also a different behaviour when a post dial
string was present, passing through all the states with some time in between
seems to result in a more stable and consistent UX with no change to functionality.
* more-tags:
Default dynamic tags to on
Display phone number type/label as a tag where relevant
Show dynamic tag "Android" when item is in Android contacts only
* gateway-icon:
Show gateway avatar on in call screen
Stephen Paul Weber
created
8c08dee
Ask user for microphone permission from dialler integration
Click to expand commit body
We can't ask them for it directly. The library I am using here will first check
if the permission is already granted. If so onPermissionGranted will fire and
we will start the call. If not, the Connection will be created in a dialling
state and a notification will appear saying that the app needs additional
permissions.
Once the user taps the notification they will then be asked to allow microphone
access. If they say yes, the call will proceed. If they deny, the call will terminate.
Using the same logic as Quicksy, but not submitting to an API just assume that
tel@pstn-or-sms-gateway is a valid Jabber ID.
Does not add to roster or reveal presence or send anything to a server, just
affects local UI.
Doing it properly this time. No Intent, no popping a second activity, just
instrument the call into the Android UI.
This turned out to be a bit easier than expected. The ConnectionService does
indeed run inside our app process everywhere it matters, so we can reuse the
machinery from elsewhere to get a reference to XmppConnectionService. Asking
JingleConnectionManager to send propose is enough to kick off all audio, etc.
Put in a guard that the JingleConnectionManager expects so that we won't try to
start a call if isBusy is true (that is, if another call is in progress), and
just return a failed connection BUSY in that case.
Added a flag to XmppConnectionService that we set when using the dialler
integration so it will temporarily ignore phone call state and not hang itself
up.
The app still shows a separate call notification, so you see two in-call
notifications. You can also go into the app during the call and manually pull
up the call UI there. If you do anything in either call UI it will work and
sync state, so that's not dangerous just perhaps odd.
Kept the connection address as a tel: for contact integration in the call
history, but use our normalized version now instead of whatever we got raw from
the system.
Add support for post-dial DTMF including 2-second pause with comma and
manual-length user-intervention pause with semicolon. Dial with 100ms break
between tones. Doing no break at all mostly works in practise, but not for two
identical tones in a row, this seems to be enough in my tests.
When using a post-dial string from contacts the UI shows more/different state
than it should and at least in my emulator plays a different ringback tone for
one ring before switching. Very odd, as though it's partially ignoring our
Connection object's settings.
Audio routing has not been tested yet (for speakerphone, bluetooth, etc).
Stephen Paul Weber
created
6fb465f
don’t query packages before attaching something
Register the service avatar, perpy background for call UI, and split the User's
JID into the headline with the service JID (eg "cheogram.com") only shown in
short description.