Hi Group,

Any clue please.


Thanks,
AJ

On Apr 6, 11:58 am, AJ <[email protected]> wrote:
> Hi Girish,
>
> I do *not* want to fetch any postal address from the database.
>
> What I want is :-
>
> I am launching the "Contact App" from my application. I want Contact
> App should appear with the data I am passing. Like : 4 Phone number,
> Postal Address, Nickname, Website etc.
>
> The problem is I am not getting how to pass :-
> 1- Postal address properly [like Street should come in place of
> street, City should come in place of city ZIP code should come in
> place of zip code etc]
> 2- I am not able to pass the 4th Phone number. [I am able to pass 3
> phone number by the code which I pasted above]
> 3- I am not able to pass Organization , Nickname, Website etc .
>
> Girish many many thanks. Pl help me out of this.
>
> Thanks,
> AJ
>
> On Apr 6, 10:50 am, Girish <[email protected]> wrote:
>
> > Hi,
>
> > You mean do you want to fetch the postal address details and email
> > details. If yes tell me i will give you the code access them.
>
> > Thanks,
> > Girish G M
>
> > On Apr 6, 12:18 pm, AJ <[email protected]> wrote:
>
> > > Hi Group,
>
> > > Any clue please.
>
> > > Thanks,
> > > AJ
>
> > > On Apr 5, 7:57 pm, AJ <[email protected]> wrote:
>
> > > > HiGirish,
>
> > > > Thanks for the reply, But this is not what I am looking for.
>
> > > > Actually I am starting "contact" application from my application with
> > > > data [like Name, phone numbers(mobile,work,faxes, etc), Email etc)].
>
> > > > Now the problem is
>
> > > > 1- I am *not* able to show Postal Address and the field which are
> > > > present in expandable list  [more section, that is in Android SDK 2.1]
> > > > 2- I am *not* able to show more than 3 phone number
> > > > 3- I am also *not* able to show more that 3 EMail Ids.
>
> > > > Thanks for the information. But If you know this then please share
> > > > with me.
>
> > > > Thanks,
> > > > AJ
>
> > > > On Apr 5, 1:10 pm,Girish<[email protected]> wrote:
>
> > > > > Hi,
>
> > > > > The above code is for 1.6 and below version, For Android 2.0 and above
> > > > > version you have to follow the below code,
> > > > > Cursor m_oCursor =
> > > > > this.getConetentResolver.query(ContactsContract.Contacts.CONTENT_URI,
> > > > > null, null, null, null);
> > > > > String pid =
> > > > > m_oCursor.getString(m_oCursor.getColumnIndex(ContactsContract.Contacts._ID)­);
> > > > > prn("PID:"+pid);
>
> > > > >                      //**********Retrieve Phone Numbers*********
> > > > >                 Cursor phoneCur =
> > > > > context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.C­ONTENT_URI,
> > > > > null,
> > > > >                                 
> > > > > ContactsContract.CommonDataKinds.Phone.CONTACT_ID+"=\'"+pid+"\'",
> > > > > null, null);
> > > > >                 prn("Phone numbers count::"+phoneCur.getCount());
> > > > >                 if(phoneCur.moveToFirst()){
> > > > >                         do{
> > > > >                                 int phoneType =
> > > > > phoneCur.getInt(phoneCur.getColumnIndex(ContactsContract.CommonDataKinds.Ph­one.TYPE));
> > > > >                                 prn("Phone Type::"+phoneType);
> > > > >                                 phoneType(phoneType);
>
> > > > >                                 String phoneNumber =
> > > > > phoneCur.getString(phoneCur.getColumnIndex(ContactsContract.CommonDataKinds­.Phone.NUMBER));
> > > > >                                 prn("PhoneNumber::"+phoneNumber);
>
> > > > >                         }while(phoneCur.moveToNext());
> > > > >                 }
> > > > >                 phoneCur.close();
> > > > >                 phoneCur = null;
>
> > > > > Try this..
>
> > > > > Best wishes,
> > > > >GirishG M
>
> > > > > On Apr 5, 2:37 pm,Girish<[email protected]> wrote:
>
> > > > > > First fetch the _id of each contact and use that id in below URL to
> > > > > > fecth the all phone number of each contact.
>
> > > > > > //**********Retrieve Phone Numbers*********
> > > > > >                 Cursor numberCursor = 
> > > > > > context.getContentResolver().query
> > > > > > (Contacts.Phones.CONTENT_URI,
> > > > > > null,Contacts.ContactMethods.PERSON_ID    +"=\'"+id+"\'",null,null);
> > > > > > //              prn("numberCount::" +numberCursor.getCount());
> > > > > >                 if(numberCursor.moveToFirst()){
> > > > > >                         do{
>
> > > > > >                                 int phoneType =
> > > > > > numberCursor.getInt(numberCursor.getColumnIndex(Contacts.Phones.TYPE));
> > > > > > //                              prn("Phone type::" +phoneType);
>
> > > > > >                                 String phoneNumber =
> > > > > > numberCursor.getString(numberCursor.getColumnIndex(Contacts.Phones.NUMBER))­­;
>
> > > > > >                                 switch(phoneType)
> > > > > >                                         {
> > > > > >                                       case 
> > > > > > Contacts.Phones.TYPE_HOME:
> > > > > > //                                        prn("Phone No(Home)");
> > > > > >                                           break;
>
> > > > > >                                       case 
> > > > > > Contacts.Phones.TYPE_MOBILE:
> > > > > > //                                    prn("Phone No(Cell)");
> > > > > >                                       break;
>
> > > > > >                                       case 
> > > > > > Contacts.Phones.TYPE_WORK:
> > > > > > //                                    prn("Phone No(Work)");
> > > > > >                                       break;
>
> > > > > >                                      case 
> > > > > > Contacts.Phones.TYPE_OTHER:
> > > > > > //                                    prn("Phone No(Other)");
> > > > > >                                       break;
>
> > > > > >                                      case 
> > > > > > Contacts.Phones.TYPE_CUSTOM:
> > > > > >                                           String
> > > > > > customLable=numberCursor.getString(numberCursor.getColumnIndex(Phones.LABEL­­));
> > > > > >                                           if(customLable != null){
> > > > > > //                                                prn("Phone 
> > > > > > No(Custom):"+customLable);
> > > > > >                                                             }
> > > > > >                                       break;
>
> > > > > >                                      case 
> > > > > > Contacts.Phones.TYPE_FAX_HOME:
> > > > > > //                                    prn("Phone No(Fax Home)");
> > > > > >                                       break;
>
> > > > > >                                      case 
> > > > > > Contacts.Phones.TYPE_FAX_WORK:
> > > > > > //                                    prn("Phone No(Fax Work)");
> > > > > >                                       break;
>
> > > > > >                                      case 
> > > > > > Contacts.Phones.TYPE_PAGER:
> > > > > > //                                    prn("Phone No(Pager)");
> > > > > >                                       break;
> > > > > >                               }
> > > > > >                      }while(numberCursor.moveToNext());
> > > > > >                 }
> > > > > >                 numberCursor.close();
> > > > > >                 numberCursor = null;
>
> > > > > > This code help you to access the Phone number. Try this.
>
> > > > > > All the best,
> > > > > >GirishGM
>
> > > > > > On Apr 4, 6:33 pm, AJ <[email protected]> wrote:
>
> > > > > > > Any clue please regarding my 2 problem
>
> > > > > > > Thanks
> > > > > > > AJ
>
> > > > > > > On Apr 3, 7:00 pm, AJ <[email protected]> wrote:
>
> > > > > > > > Hi group
>
> > > > > > > > Now I am able to insert 3 phone numbers.
>
> > > > > > > > But There does not looks a way that How can I enter other phone
> > > > > > > > numbers like :- Work Fax, Home Fax, Pager etc.
>
> > > > > > > > Any clue please.
>
> > > > > > > > Here is the code what I have done:-
>
> > > > > > > > > > 1- How can I show multiple phone number [like Home, Mobile, 
> > > > > > > > > > Work etc]
> > > > > > > > > > when I am launching contact application. How can I do that?
>
> > > > > > > > ----------------------------------------
> > > > > > > > i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE,
> > > > > > > > "222222");
> > > > > > > > i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE,ContactsCon­­­tract.CommonDataKinds.Phone.TYPE_HOME);
>
> > > > > > > > i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE,  
> > > > > > > > "333333");
> > > > > > > > i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE,ContactsCont­­­ract.CommonDataKinds.Phone.TYPE_WORK);
>
> > > > > > > > --------------------------------------
>
> > > > > > > > On Apr 3, 6:30 pm, AJ <[email protected]> wrote:
>
> > > > > > > > > Any clues from experts.
>
> > > > > > > > > - AJ
>
> > > > > > > > > On Apr 3, 3:51 pm, AJ <[email protected]> wrote:
>
> > > > > > > > > > Hi Group,
>
> > > > > > > > > > I am able to launch contact application from the following 
> > > > > > > > > > way. I am
> > > > > > > > > > also able to show Name and only one Phone number. My 
> > > > > > > > > > problem is :-
>
> > > > > > > > > > 1- How can I show multiple phone number [like Home, Mobile, 
> > > > > > > > > > Work etc]
> > > > > > > > > > when I am launching contact application. How can I do that?
> > > > > > > > > > 2- In Contact application there is one option *More*, which 
> > > > > > > > > > is an
> > > > > > > > > > expandable list. When I click that it open with other many 
> > > > > > > > > > fields like
> > > > > > > > > > Notes, Website, Nicknam etc. How can I fill those
>
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to