第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

使用公共數(shù)據(jù)庫(kù)的Firebase聊天應(yīng)用setValue失敗錯(cuò)誤?

使用公共數(shù)據(jù)庫(kù)的Firebase聊天應(yīng)用setValue失敗錯(cuò)誤?

狐的傳說(shuō) 2019-07-27 19:54:09
使用公共數(shù)據(jù)庫(kù)的Firebase聊天應(yīng)用setValue失敗錯(cuò)誤?我有一個(gè)使用Firebase的聊天應(yīng)用程序,它繼續(xù)使用x處的setValue失?。篋atabaseError:權(quán)限被拒絕每次輸入消息時(shí)都會(huì)出錯(cuò)。我已將數(shù)據(jù)庫(kù)設(shè)置為公開(kāi):service cloud.firestore {   match /databases/{database}/documents {     match /{allPaths=**} {       allow read, write: if request.auth.uid != null;     }   }}這是我的聊天參考內(nèi)容嗎?private void displayChat() {     ListView listOfMessage = findViewById(R.id.list_of_message);     Query query = FirebaseDatabase.getInstance().getReference();     FirebaseListOptions<Chat> options = new FirebaseListOptions.Builder<Chat>()             .setLayout(R.layout.list_item)             .setQuery(query, Chat.class)             .build();     adapter = new FirebaseListAdapter<Chat>(options) {         @Override         protected void populateView(View v, Chat model, int position) {             //Get reference to the views of list_item.xml             TextView messageText, messageUser, messageTime;             messageText = v.findViewById(R.id.message_text);             messageUser = v.findViewById(R.id.message_user);             messageTime = v.findViewById(R.id.message_time);             messageText.setText(model.getMessageText());             messageUser.setText(model.getMessageUser());             messageTime.setText(DateFormat.format("dd-MM-yyyy (HH:mm:ss)", model.getMessageTime()));         }     };     listOfMessage.setAdapter(adapter);}
查看完整描述

2 回答

?
寶慕林4294392

TA貢獻(xiàn)2021條經(jīng)驗(yàn) 獲得超8個(gè)贊

改變這一點(diǎn)

request.auth.uid != null

request.auth.uid == null

或者在開(kāi)始用戶定義的用戶定義的對(duì)話之前定義適當(dāng)?shù)腶uth機(jī)制


查看完整回答
反對(duì) 回復(fù) 2019-07-27
  • 2 回答
  • 0 關(guān)注
  • 499 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)