shashank
(Shashank Gahtori)
August 25, 2020, 5:48am
#1
Hello.
I am making a basic chat application, and I want the my Phone Contacts List to show up in a ColinTreeListView.
I am using @DeveloperLeo Extension GetContactList to get the contacts list.
Here are the blocks I have tried:
There are two problems with this:
When the screen initializes, I get a runtime error:
Runtime Error
Attempt to invoke interface method 'android.app.Activity com.google.appinventor.components.runtime.ComponentContainer.$context()' on a null object reference
End Application
When I tap on the floating icon, which is meant to return the phone contacts list in the ColinTreeListView “named as ContactsListView” , nothing shows up (it is blank).
Can someone please help me resolve this issue?
Thanks.
I think the request permission to read the contacts is wrong !!!
I can’t fond the right string
shashank
(Shashank Gahtori)
August 25, 2020, 6:01am
#3
Made slight changes to the blocks, please have a look:
shashank
(Shashank Gahtori)
August 25, 2020, 6:02am
#4
The developer himself said that this one permission is required to get contacts list:
yes only one :- android.permission.READ_CONTACTS
Right, but android.permission.READ_CONTACTS ≠ READ_CONTACTS
that’s what I mean
Try change READ_CONTACTS with android.permission.READ_CONTACTS
shashank
(Shashank Gahtori)
August 25, 2020, 6:07am
#6
But it is asking for permission to read contacts when I try it.
I start again because we both wrote at the same time
Try change READ_CONTACTS to “android.permission.READ_CONTACTS ”
1 Like
shashank
(Shashank Gahtori)
August 25, 2020, 6:13am
#8
Still not showing, I think the problem is within the when LeoContactList1 .GotContactsList
block
Little trick he used to tell when something is wrong. Put a label in the design, next, inside LeoContactList1 set label text > numberList and check if you have results
1 Like
shashank
(Shashank Gahtori)
August 25, 2020, 6:31am
#10
Yes I am getting the number list,
That means there is something wrong with the later part…
This blocks is wrong for me… change to numberList !!!
OK go back… when you set label into LeoContactList1 have the error ?
shashank
(Shashank Gahtori)
August 25, 2020, 6:57am
#16
global contacts instead of the arrangement in the Initialize Scroll? I don’t think that would work?
dora_paz
(Dora)
August 25, 2020, 6:58am
#17
No call initialize scroll first , all blocks to top, call listview set to bottom
You need set the colin tree first before created a list