Contacts

You can use the ContactFragment provided by the Delivered SDK to easily find other registered users and add then to your contacts list. Here is a sample snippet on how to add the ContactFragment to your application:

public class ContactsActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_contacts);
        
        ...
        
        ContactFragment contactFragment = new ContactFragment();
        FragmentManager fragmentManager = getSupportFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

        fragmentTransaction.add(R.id.contact_fragment_container, contactFragment);
        fragmentTransaction.commit();
        
        ...

    }
	...
}

To find users to add to your contacts click on the search button displayed at the bottom right corner of the screen:

contacts_screem_empty.png

Currently the ContactFragment supports user search by name. Results of the search will be displayed in the list as follows:

contacts_screen_search.png contacts_screen_search_result.png

Tap on a result to view their user profile where you will find the option Add to contact to add them to your contacts:

add_to_contact.png

This action will produce the following result:

added_to_contacs.png

You can remove a contact by tapping on the “Remove from contact” button.