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.
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.
Related
I have a question that I am struggling to find the answer to. What I am looking to do is create an app that will show a different template depending on the user that signs in.
For example, two users A and B. When A logs in I am hoping for them to see a tabbed template that will have features x,y and z but when B logs in I am hoping they will see a simple activity with feature c.
Ideally there will be a point of contact for the admin that will allow them manage the different templates and who sees which ones.
Is this something that can be achieved at all or is it a waste of time?
Can you please tell me exactly how you wanna show templates to the user like in listview or something else.
Secondly the thing which you want is achievable this has to be done from the server end suppose if you are showing your template in a listview so server will send you data accordingly like if user A logs in the db will give you value of the templates which your admin wants to show to your user and later you can open the templates according to the listview item selected .
Happy Coding .
First of all I will not post some code here because there is no idea to start with.
I'm planning on creating a quiz type app on android with different quiz type like
identification, multiple choie, matching, fill-in-the-blanks, true/false etc. And divide
them into different parts of the quiz for e.g. for Test I. Identification, Test II. Multiple
Choice and so on.. I will also give the user the capability of going back to previous parts
of the exam for e.g. I'm currently on Test III. and suddenly I got an answer for a question
from Test I., I can easily go back to that question and answer it.
Current ideas so far:
1. Create an app that implements ViewPager. Different quiz type on each pages?
2. Create a ListView put all the questions in there but all the questions are stil on their respective group first few questions is from Test I., Test II., etc. in their respective order.
Current problems encountered for the ideas above:
1. How can I submit the different forms from different pages on the ViewPager?
2. When the data contains a lot of questions the ListView will have a lot of scrolling
between each questions. To solve this, I may create a floating-like navigation(I don't
really have any idea on what to do with this) on the right side of the screen so that I can
scroll instantly to Test I. with a click of a button.
*Please consider the ideas above noob-ish, I don't really know if some of the ideas that
I'm talking about is possible or not, and please you may post the exact terminology on what
you are talking about so that I can search it up.
Ok I've decided to go with ViewPager in creating this app.
ViewPager
I'm working on an Android app that does nothing more then storing data in a SQLite database and displaying it.
Since I have a .NET background I started off developing the app with MonoDroid (C#). After developing the app with MonoDroid I thought it would be fun to redevelop it with Java and learn along the way.
In the original app I used a TabActivity and created 4 tabs to stucturize the data I want to save in a single table. Underneath the tabs I placed a button. A click on the button collects all data on the 4 tabs to store it, and it worked perfect.
Now developing with Java I noticed that the TabActivity is deprecated and I found out that I have to use fragments. I was able to create the tabs following this article. However, I am no longer able to read the data on the tabs. I searched online and tried the most ridiculous "solutions" for a couple days in a row now, and I start to doubt if the functionality I look for is possible.
Please advise me what to do! Is it possible to recreate this functionality using fragments? If so, can anyone give me some pointers?
If not, what would be the best way to approach this?
Thanks in advance!
Does anyone have a tutorial or link to android source or anything that I can use to learn how android created their contacts app. I'm looking into creating a small app that will can display some data similar to how the contacts app displays its contacts. It seems to be some kind of list view with image buttons for actions.
**EDIT***
Lets make this a little easier, any one have any idea how on Android 2.1 and so far up to 2.3 the contacts tab and favorites tab can display a contact and next to it a button. I had thought this was somehow done in a listview but according to what I've read it's not possible to have a clickable listview plus button on a list item. So I'm assuming somehow a listview is being created and a button added next to the listview. I've tried looking at stock android source on github but I just dont understand it.
Here's the git hub for the Android contacts application:
https://github.com/android/platform_packages_apps_contacts
One year ago I developed a sync adapter for Android.
At that time it wasn't possible to show a custom activity or to customize the standard activity to edit a contact.
The result was that, although it was possible to configure the synch adapter in a such a way that the added contacts where editable, to edit a contact was not really feasible, unless the custom contacts were the same as the normal ones.
Is it still like that? Did google fix the problem?
See for a reference:
http://groups.google.com/group/android-developers/msg/86d4d895e88a5ebb
I found this: http://groups.google.com/group/android-developers/msg/85f9304dfcc4e284
but it does not say where to find the documentation
There is a workaround catching an intent to launch your own activity.
you need to modify a bit the following example but it works very well (on 2.3.x and 4.0.X) for me for insertion.
https://stackoverflow.com/a/11153652/1195001