android-contacts

Is it possible to read the call cost history from dialogue raised after ending the prepaid call?

亡梦爱人 提交于 2019-12-02 18:29:54
Is there a possibility of handling the data displayed on call cost dialogue received by prepaid user. I want to save all the balance reduction for along with call duration in my sqlite db. As we learn from the already famous blog post As a start, look at the PhoneUtils class in the Android source code. [...] Specifically, looking at line 217, an intent with the name “com.android.ussd.IExtendedNetworkService” is being composed. So what you need to do is implement your own service that responds to that intent . The service needs to be implemented according to the IExtendedNetworkService.aidl

Android: Manage contacts with lookup key

江枫思渺然 提交于 2019-12-02 17:35:37
问题 Following up on this question: Android: Manage contacts with lookup key (see below) I have the same problem. However, it shows with Android 2.1 Update 1, But is OK with Android 2.2. It seems that the lookup key changes with contact's name change with Android 2.1, but does not change with Android 2.2. Did anybody else experience this? Any suggested workaround for Android 2.1? Thanks Original question by chromate Hi everybody, I'm currently writing a application that allows to save drafts

How to Check if a contact on android phone book has whatsapp enabled?

橙三吉。 提交于 2019-12-02 16:51:55
For a given number from my address book, I need to look-up if the number has whatsapp enabled. (The idea is to choose SMS/WhatsApp for initiating a text intent) Lets say, I have two numbers under a contact, And I need to know which one has whatsapp enabled. The "People" app on the Nexus 4 shows both contact numbers, And also a little below has a CONNECTIONS section, which shows only the WhatsApp possible contact. Is there a way to look up(like how People app does) ? idog If you want to know if this contact has WhatsApp: String[] projection = new String[] { RawContacts._ID }; String selection =

Android Contacts provider get only phone contacts with all emails

南笙酒味 提交于 2019-12-02 16:43:32
I need to get all phone contacts and their email address and photo uri: This is what am doing: private void getContacts() { ContentResolver cr = getContentResolver(); Cursor cur = cr.query(Contacts.CONTENT_URI, null, null, null, Contacts.DISPLAY_NAME); if (cur.getCount() > 0) { while (cur.moveToNext()) { // if // (Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) // > 0) { Contact contact = new Contact(); String id = cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID)); Uri uri = getContactPhotoUri(Long.parseLong(id)); // set photoUri

Showing some contacts multiple times in my App from phone book

故事扮演 提交于 2019-12-02 14:41:06
问题 I'm getting same contact three or two times in my app this happening with some contacts not with every contacts. In my app everything is working as expected but when clicking on show contact from my it's shows three time same contact but in mobile phone contact stored only one time. I tried everything from my side but not able to solve this can any body please help me. Or is there any alternative way for same. Here is my code:- @Override protected Integer doInBackground(Void... params) { try

Android: Manage contacts with lookup key

≯℡__Kan透↙ 提交于 2019-12-02 13:29:06
Following up on this question: Android: Manage contacts with lookup key (see below) I have the same problem. However, it shows with Android 2.1 Update 1, But is OK with Android 2.2. It seems that the lookup key changes with contact's name change with Android 2.1, but does not change with Android 2.2. Did anybody else experience this? Any suggested workaround for Android 2.1? Thanks Original question by chromate Hi everybody, I'm currently writing a application that allows to save drafts (using android version >= 2.0). Each draft is connected to a contact via the ContactsContract.Contacts

how do i get startActivityForResult() to bring up just a list of telephone contacts (like when i click on the “People” icon) using the android sdk?

两盒软妹~` 提交于 2019-12-02 11:17:30
excuse me if this question is obvious, but I am new to android sdk. What I am trying to do is get a list of contacts that have real telephone numbers to send an sms message. I am deploying directly to my phone and trying to use just the contacts listed on my phone, but I am getting too many weird contacts. I would expect that when I call the startActivityForResult() method it will give me a list of phone contacts. What it seems to do is give me a list of all potential contacts and that seems to include twitter, facebook, and every potential email address I have sent to instead of just the

How to add postal address to contacts in android programmaticaly?

本秂侑毒 提交于 2019-12-02 10:57:02
I am developing app which add contact info to android contact list .to How to add postal address to contacts in android programmatically ? Postal address are stored like all the other info in the DATA table with a MIMEtype == ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE Please google ContactsContract.CommonDataKinds.StructuredPostal to find all the info. If you need to know how to edit a contact in general I would suggest you to have a look to the SampleSyncAdapter in the Android SDK. It is a sync adapter so you don't need to study everything but updateContact in

Android display contacts of type custom

好久不见. 提交于 2019-12-02 10:16:32
I have imported an sample of Contact List...Form this link... http://developer.android.com/training/contacts-provider/display-contact-badge.html this is working fine with all functionality.... Now in list if i want to display only some of the contact...the where should i fire a query for that ..and how... if any one has work on it...please help me... Thanks in advance.... you can also modify this query dear cntx.getContentResolver().query(Contacts.CONTENT_URI, CONTACTS_SUMMARY_PROJECTION, select, null, Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC"); i maintain one contact wrapper so i have

Call in Android application shows add contact dialog

ぃ、小莉子 提交于 2019-12-02 08:57:35
I'm using this code for calling, in Android application: Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:" + call.Number)); startActivity(callIntent); but I obtain a dialog like this: Why no call is make? P.s: I'm using a Tablet (Acer Iconia A501), not a smartphone. Try this Make sure : call to : startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" +mEditText_number.getText()))); Add permission: <uses-permission android:name="android.permission.CALL_PHONE" /> 来源: https://stackoverflow.com/questions/13624599/call-in-android-application-shows-add