Skip to content

App just crashes #28

@Akash437

Description

@Akash437
public void getContactList() // this function is executed on button click
    {
        Contacts.LoadContactList(onContactLoadDone, onContactLoadFailed);
    }

    void onContactLoadFailed(string reason)
    {
        ContactfailString = reason;
    }

    void onContactLoadDone()
    {
        Debug.Log("Contacts loaded");
        foreach (GameObject g in ContactLoadedParent)
        {
            GameObject.Destroy(g);
        }
        ContactfailString = null;
        foreach (Contact c in Contacts.ContactsList)
        {
            GameObject temp = GameObject.Instantiate(Contactitem, ContactLoadedParent);
            Text[] t = temp.GetComponentsInChildren<Text>();
            t[0].text = c.Name;
            t[1].text = c.Phones[0].Number;
            temp.GetComponentInChildren<RawImage>().texture = c.PhotoTexture;
        }
    }

have modified the manifest as well to include the following permissions

<uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

but the app still crashes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions