English 中文(简体)
如果我们知道联系电话:
原标题:How to make a phone call (to call a given person) if we know the contact s _ID
  • 时间:2012-01-13 11:52:52
  •  标签:
  • android

我的问题是,我把联络人/人——ID储存在一个数据库中,我想发出电话,以便在用户使用一个顿子时打电话给所储存的联系人。

我从一个库库检索到该数据库,并将其储存到一个数据库。

String CONT_ID = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID)); ...

Later on, when the user presses a button I call

 Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("content://contacts/people/" + CONT_ID));
 startActivity(intent);

现在,problem is that the dialer is show but it is “empty”, it does not show theCHE person.

因此,看来它没有填补这个人。 《安乐施发展指南》在文字描述中说:

行动: 内容:内容 纽约总部 用填满的人显示电话线。

我如何填补所希望的人? 任何 h?

问题回答

Uri.parse("content://contacts/people/" + CONT_ID)

在这里,你预计<代码>content://contacts/people/ + CONT_ID应当提供电话号码,但不会出现需要查询的缩影。

<>说明: 请参阅这一联系:

甲型六氯环己烷接触和roid应用





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签