简体   繁体   中英

Android - Launch Google Voice app and dial number

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.

  • NOTE: our app is Mono for Android, but Java answers will work for us just as well

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM