Package com.example.qrgo.firebase
Class CommentFirebaseManager
- java.lang.Object
-
- com.example.qrgo.firebase.BaseFirebaseConnectManager
-
- com.example.qrgo.firebase.CommentFirebaseManager
-
public class CommentFirebaseManager extends BaseFirebaseConnectManager
-
-
Field Summary
-
Fields inherited from class com.example.qrgo.firebase.BaseFirebaseConnectManager
db
-
-
Constructor Summary
Constructors Constructor Description CommentFirebaseManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddComment(java.lang.String commentText, java.lang.String username, java.lang.String qrString, java.lang.String userFirstName, java.lang.String userLastName, OnCommentAddListener listener)Adds a new comment to a QR code.voidgetComment(java.lang.String commentId, OnCommentLoadedListener listener)Get Comment object for given comment id.
-
-
-
Method Detail
-
getComment
public void getComment(java.lang.String commentId, OnCommentLoadedListener listener)Get Comment object for given comment id.- Parameters:
commentId- The id of the comment.listener- The listener to be called when the Comment is loaded or load fails.
-
addComment
public void addComment(java.lang.String commentText, java.lang.String username, java.lang.String qrString, java.lang.String userFirstName, java.lang.String userLastName, OnCommentAddListener listener)Adds a new comment to a QR code.- Parameters:
commentText- The text content of the comment.username- The username of the user who wrote the comment.qrString- The hash of the QR code that the comment is being added to.userFirstName- The first name of the user who wrote the comment.userLastName- The last name of the user who wrote the comment.listener- An OnCommentAddListener object that will be notified when the comment is added.
-
-