This page (revision-1) was last changed on 20-Apr-2024 11:53 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
20-Apr-2024 11:53 1 KB UnknownAuthor

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 38 lines
[{PageViewPlugin}]
[Firebase], [Cloud Functions]
!!!Abstract
|FirebaseのFirestoreというデータベースを使ってみました。
!!!Topics
!!Realtime Database? Firestore?
|進化したようだ。進化したのがFirestore[1]。だからFirestoreを使おう。
!!Quick Start
*Quick Start android
|quickstart-android-masterフォルダにfirestoreフォルダがあり、[Android Studio]で開く。
|いつものToolsのFirebaseメニューのAsistantでConnect、Dependencies set upをして、
|Firebase Consoleで、メール認証をOKにすると、Friendly Eatsというアプリが立ち上がる。
|Restaurant情報がFirestoreにアップされる。
|MainActivityのonAddItemsClicked()の当たりが参考になる。
*Quickstart web
|[6]に従って進めると、できる。
!!やりたいこと
*サーバにAndroidから位置情報をアップロードしたい。
|クイックスタートの例だと、用意されているバッチを使ってセットしてコミットするとOK。
{{{
java.lang.RuntimeException: Found conflicting getters for name isChangingConfigurations on class
}}}
|インナークラスがだめらしい[3]。ちゃんとクラスを作ると解決
{{{
java.lang.RuntimeException: Class java.util.GregorianCalendar has multiple setter overloads with name setGregorianChange
}}}
|Calendarは使わないほうがいいみたい[4]。とりあえず文字列にすることで解決
[{Image src='Firestore/firestore.jpg' width='500'}]
*サーバ側のデータがアップデートされたら、イベントを起こしたい。
|that should be [Cloud Functions]!
!!!Reference
#[#1]1amageek, 2017年12月, Cloud Firestoreは進化したFirebase Realtime Database, [https://qiita.com/1amageek/items/8179aebe871beb230194]
#[#2]Google Inc, 2017, Cloud Firestore Quickstart, [https://firebaseopensource.com/projects/firebase/quickstart-android/firestore/README.md]
#[#3]Stackoverflow, ANDROID FirebaseDatabase: Unable to save object, [https://stackoverflow.com/questions/40703001/android-firebasedatabase-unable-to-save-object]
#[#4]Stackoverflow, Firebase Android - Crash with “Found a conflicting setters with name: setGregorianChange” when .setValue(), [https://stackoverflow.com/questions/41917562/firebase-android-crash-with-found-a-conflicting-setters-with-name-setgregori]
#[#5]Google, 2017, Cloud Firestore Quickstart, [https://firebaseopensource.com/projects/firebase/quickstart-js/firestore/README.md]