Ben van Jaarsveld

+ Follow
since Jun 05, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ben van Jaarsveld

Hi guys greenhorn here...

I am trying to create a expandable listview inside a slide menu... I have followed a tutorial and have gotten a lot to work...

'What I would like to happen is that I want to add an employee to a FirebaseDatabase, then for the employee to be added to the Menu{with a ChildEventlistener}, but I am unable to add the the employee in time, as my Arraylist is empty when the menu is created... because it takes some time to retrieve the information from the Firebase Database..

So I was thinking: while I add the information online, why don't I add the information to a local  ArrayList, and then just populate the menu from the local arrayList...(I think this will save time? is this a good idea? my arrayList would be small, max 5 items)..

If I do it like this then I will need to add an arrayList to an arrayList in another class...

so in AddEmployeeDetails.class I have:

In MainActivity.class I create the menu with an ArrayList:the menu works if I just add random items to the ArrayList, but not if I request anything from the website, but I would like to no retrieve the items from "names" Arraylist in AddEmployeeDetails.class


I have tried: (as listed in other solutions)

Please help me... or direct me in the right direction

Thanks, Like always
1 week ago
Thanks man.... simple grammar problem... (was thinking more than 1 string makes Strings) ha ha ha
3 weeks ago

and in onCreate:

3 weeks ago
Hi ,

I am trying to add an item from a snapshot to an array list, but am getting the following error:      

I am added data to a database on Firebase Database...

and Iam trying to write a function that will update an ArrayList everytime there is a change in the particular node in the database: this is what I have done:

the dataSnapshot prints out this line:

the error: add( ArrayList cannot be applied to (java.lang.String)

I am trying to add the value: "name" to the ArrayList<String> called names

and onCreate:

Please help me, how do I do this... I can't find a tutorial that is clear on how to add a value to the ArrayList
3 weeks ago
I found some solutions... butit doesn't seem to work for me:

this is what I've tried:

I found some answers but it doesn't seem to work...

this is what I;ve tried:

3 weeks ago
Does Firebase database questions also fall under this FORUM?

if so please check out my question from earlier...

3 weeks ago
Hi guys, thanks for always being here for questions...

I have a project and currently am really struggleing to sort out the following aspect of it:

I have created a FirebaseDatabase, and through my android app upload information,

so under the main node I have a user id:
   under the userId I have 1)employer information(is not important for my question)
                               and 2)employee infromation                                                      
                                           ==>I upload the employees with a AutoIncrement function, so they are listed as==>1)  0
                                                                                                                                                                   2)   1
                                                                                                                                           under these nodes I upload the information: name, surname, address, tel number etc..

(part 1)
What I would like to do is: request the employees names
add them to an arraylist, to be added to an ExpandableListview
the parts that is expandable in the listview is pre-defined(info,discipline, leave, payslip)
add this to a Navigationview, for a slide menu...

NOW.... I have been following al lot of tutorials on everything so far.... requesting data, Expandable listviews, Navigationview.... but always somewhere between the tutorials, the information becomes murky and I lose track... please help:

.....................uploading employee details: FBMethods.class.....................

That is how I upload the (1 set of information) employee details....

Part 1==requesting the name node:(this is what I have so far, but I am not sure what values to request:


I think if I can get the name values, in the nodes in an arraylist, I will be able to go further.... but this is where I am stuck currently... please help...

not resolved but found another tutorial that gave me the answer that I need...
1 month ago
Hi guys..( I hope this is posted to the right area...if not can a moderator move it please)

I am busy with a project that will store information to FirebaseDatabase... I wrote all the code as per the tutorials, but my database setup is a little different to what the tutorial is teaching..

I created a user and Logon in Firebase Auth...

and under this User UID, in the database I have created the fields that I want to save...but what is happening is that the data that is being uploaded to the database is not stored under the
User UID but under a random number?? Could Someone please help me with this:
the code that is uploading the data:

I have an Emper_info_data.class that has all the getters and setters...

the Firebase Database looks like this:


      =>ljhdflghlkshfl....(random code with the uploaded data)


      =>xxxxxxxxxx....(userid with required place of storage)



I hope this helps...

Thanks a lot

1 month ago
Hi sorry... yes... I have created a slider menu, but I would like the items in the menu to change to the people that I have inserted into the database..\

So when there is only 1 person's details added to the database... there will only 1 item on the menu, and as you add people, the lists will get longer

1 month ago
Hi guys...

Some advice please:

I am trying to create a slide menu with information that changes...

inside the app you can add personal information about people(into a database)... and I would like to create a listview inside the menu so that when selected the information is displayed in a fragment...

is this possible? and how would I go about it... any tutorials?


1 month ago
Thank you for all your help...(Android Studio)

please excuse my terminology... it is late here and I think I am just tired... what I meant to say was...  "Cannot resolve symbol"

Anyway, in this case, there was a typo in my example -- should have been imgURLs rather than imgUrls

and that is what I got for just copying and pasting and not typing it out for myself..    
1 month ago