I made an activity which reads all my contacts and put the names into an Arraylist. This ArrayList is used to fill up my ListView. If I'll click on an item in this ListView the app will search in my contacts for the name and start an Activity with putting the name and number through intent.putExtra. The Chat is stored with tinyDB (https://github.com/kcochibili/TinyDB--Android-Shared-Preferences-Turbo/blob/master/TinyDB.java) which takes the phonenumber as the key.
All works fine but one scenario breaks this concept. If I have one contact with multiple phone numbers and I'll click on him in the ListView my code is going to search for the name in my contacts and take this number to start the chat. So the chat will be started with the phone number of the contact which my code will find first every time. So it is impossible to start the chat activity with the second phone number.
So I thought I should put the phone number into the arraylist too but then they will shown up in the ListView.
Some advices?