0

I have searched over google and SO for answers before asking.

Things that you should know before answering:

  • I'm very new to working with android apps and making them.
  • I'm making an app that has multiple tabs.
  • All tabs are in the same class (should I make a separate one for each?).
  • There's a tab for contacts and another for events.

Questions:

1- How do I import contacts from the phone to my app?

I have looked and found topics about this:
- Working With Android Contacts
- SO Question
- TUT:Call contacts
But the problem is that I am unsure as to where (which files i.e package/class) to place the given code.

2- Do I need a database for that?
3- Will I need to put my tabs in different classes first?
4- Is there a way to put the imported contacts in groups from the app itself?
5- Will the same answers apply for the events tab?

Finally, if you're willing to help me more you could give me some contact information where I can reach you.

Community
  • 1
  • 1
Qwas Qwas
  • 1
  • 1

1 Answers1

0

1.If you want to just view your contacts in your app then there is no need for database. You can just view them as a ListView using cursor.

See here -:http://www.edumobile.org/android/android-programming-tutorials/read-contacts-from-device/

2.You can store them in database as well.But only if you need to use them again in your app somewhere.

3.For working with tabs take a look at ->http://developer.android.com/guide/topics/ui/declaring-layout.html#CommonLayouts

Make different class for each tab as shown in tutorial.

sarthakmeh
  • 90
  • 8
  • I'm not sure if you understood my question, I want to make the contacts import the way WhatsApp does it. – Qwas Qwas Jun 10 '13 at 20:27