Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+14 votes

This could be on any platform or using any technologies. Hopefully this post might give a network where people can reach out for help if they get stuck on a problem that someone has already solved.

asked in CSC490_Spring2019 by (8 points)

3 Answers

+6 votes

Learning about the SHA-1 code and how our project would not even build when we had an unregistered SHA-1

answered by (8 points)
+5 votes

Finding out that if your object hits your player, you go flying off into space. That was really interesting and not at all disorienting to discover

answered by (8 points)
+4 votes

Okay so here me out on this! If you are planning on using Firebase and you have created any custom class to store a custom type for your project please read through these two links.

I spent many hours trying to store a custom type / object into Firebase (containing many different fields like: String, int, ArrayList, etc.) and I wanted to be able to reference this stored data for some functionality of my application.

It turns out that the "DataSnapshot" type that is provided in the Firebase package has a method for getting all immediate children of the current DB reference point. So, you are able to store this into your own custom type by the following code.


Declare a global list to store the data to:
ArrayList list = new ArrayList<>();

list = new ArrayList<>();
myRef.addValueEventListener(new ValueEventListener() {

        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
            DataSnapshot d = dataSnapshot.getChildren;
            CustomType q = d.getValue(CustomType.class);
            // Now from here you are able to do any get() methods you have defined in your 
               own custom class and a way to test this until you figure out how you want to use it 
               is as follows!
           ToastToast.makeText(this, ""+list.get(0).getName(),Toast.LENGTH_SHORT).show();




If you need any additional clarification on this let me know during class and I can hopefully assist you.

answered by (8 points)

@Stonedahl ---- can you help fix the formatting of my answer...it's not letting me change much unfortunately.