Skip to main content

Posts

Showing posts from September, 2010

Android Contacts DB Internal

Important Contact DB Tables: This article describes few of the important tables of Contact Application Database- raw_contacts , contacts and data . Following section will describe usage of few of the important columns of these tables- raw_contacts - stores entries for all contacts. So if you have 100 contacts, there will be 100 records in this table. For the purpose of data normalization and reduce data redundancy,  this table stores basic contacts details and foreign keys of other tables (e.g. contacts tables) which in turn stores particular contact details like count of links, whether contact has email id etc. Column Name Purpose Id unique ID for each Contact display_name Contact name (first and last name are clubbed together) display_name_reverse . This column is read when you set display order “reverse” instead of display_n

Call Control in Android

This tutorial is for those who want to control Phone Call in Android OS. Programmatic approach to Accept or Reject call without user intervention. Kindly note, this approach uses Java Reflection to call methods of an internal class of Android Telephony Framework and might not work with all versions of Android OS. The core concept has been explained in this Android open code . 1st thing 1st, Give the permission . You need to define 3 User Permissions to handle call related functionality- android.permission.READ_PHONE_STATE android.permission.MODIFY_PHONE_STATE (For answerRingingCall() method) android.permission.CALL_PHONE (For endCall() method) Define a Receiver... Create a Receiver which accepts broadcasts with intent action android.intent.action.PHONE_STATE, define following in the Manifest- [receiver android:name=".PhoneCall"]         [intent-filter]             [action android:name="android.intent.action.PHONE_STATE"/]            [/intent-filter] [/receiver] Ha