Reputation: 26495
We are working on an Android tablet-only app. We need to be able to launch the Google Voice app for a certain telephone number programmatically.
We tried this (which it would probably work to launch the phone if our app wasn't running on a tablet), but it did not work:
var intent = new Intent (Intent.ActionView);
string uri = "tel:" + number;
intent.SetData (Uri.Parse (uri));
activity.StartActivity (intent);
Code ported from Java here.
All it does is popup a box to add the number to a contact--which is not what we want.
Any ideas? We can't find any examples online of doing this, and I'm sure it would use a completely different url scheme, etc.
Upvotes: 2
Views: 817
Reputation: 1006869
From my examination of Google Voice, I doubt that this is possible. It certainly is not supported -- they offer no activities with any likely that fits your needs.
can you post a little more info on how you looked at the intent-filter of an existing app?
There is a handy app on the Play Store called AppXplore, from Sony. It lets you inspect various details about installed apps, including having it effectively regenerate the manifest from data held in PackageManager
.
So, I installed Google Voice and examined it in AppXplore, sifting through all the activities (there's a zillion of 'em) for interesting <intent-filter>
elements. I was a bit surprised that they didn't offer a tel:
filter, and I didn't see anything else likely to be relevant.
Upvotes: 1