I have a question about the Android studio that connects the Firebase

Asked 2 years ago, Updated 2 years ago, 38 views

I'm copying this, but there's a problemㅠ<

I connected the database, but even if I enter that code, it doesn't appear in that format (see attached image) on the Firebase database screenI printed out "Hello world" and it worked well. Are there any items that I need to set separately in the database?

I will attach my code below

package com.example.myapplication;

public class Board { String title; String content;

Board(){}

Board(String title, String content){
    this.title=title;
    this.content=content;
}
public String gettitle(){return title;}
public String getContent(){return content;}

}

<EditText
    android:id="@+id/edittext1"
    android:layout_width="304dp"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:ems="10"
    android:inputType="textPersonName"
    android:text="Title" />

<EditText
    android:id="@+id/edittext2"
    android:layout_width="304dp"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:ems="10"
    android:inputType="textPersonName"
    android:text="Content" />

<Button
    android:id="@+id/button1"
    android:layout_width="204dp"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:text="OK" />

<ListView
    android:id="@+id/listview1"
    android:layout_width="match_parent"
    android:layout_height="500dp"
    android:layout_weight="1" />

android-studio

2022-09-21 11:38

1 Answers

Did you set up the project properly in the Firebase console?

If you set it up correctly, is the data in the Firebase database stored properly?


2022-09-21 11:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.