android - While the data I pull from firebase comes on other screens, it does not come on another screen, it only stays on the l

I'm pulling data from firebase for my application but I'm getting an errorRuler Firebase :{

I'm pulling data from firebase for my application but I'm getting an error

Ruler Firebase :

{ "rules": {
  ".read": true,
    ".write": false    
} }

this error:

2025-03-08 20:54:54.605 16413-16444 PersistentConnection com...at.jetpackcomposeflyticketapp W pc_0 - Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding '".indexOn": "from"' at Flights to your security and Firebase Database rules for better performance

xml:

<uses-permission android:name="android.permission.INTERNET" />

build.gradle.kts

implementation("io.coil-kt:coil-compose:2.5.0")

kt:

package com.ferhat.jetpackcomposeflyticketapp.Domain

import java.io.Serializable

data class FlightModel(
    var AirLineLogo: String = "",
    var AirLineName: String = "",
    var ArriveTime: String = "",
    var ClassSeat: String = "",
    var Date: String = "",
    var From: String = "",
    var FromShort: String = "",
    var NumberSeat: Int = 0,
    var Price: Double = 0.0,
    var Passenger: String = "",
    var Seats: String = "",
    var ReservedSeats: String = "",
    var Time: String = "",
    var To: String = "",
    var ToShort: String = "",
) : Serializable

kt: AirLineLogo in this code does not come

AsyncImage(
    model = item.AirLineLogo,
    contentDescription = null,
    modifier = Modifier
        .size(200.dp, 50.dp)
        .constrainAs(logo) {
            start.linkTo(parent.start)
            top.linkTo(parent.top)
            end.linkTo(parent.end)
        }
)

firebase data :

airlineLogo:".png"
airlineName:"Alsusha Airlines"
arriveTime:"2h 45m"
classSeat:"Business class"
date:"24 aug,2024"
from:"NewYork"
fromShort:"JFK"
numberSeat:79
price:170.6
reservedSeats:"D1,B3,B3,F6,E4,D1,D5,A6,A8,E7,F9,D11"
time:"12:54"
to:"LosAngles"
toShort:"LAX"

When I did this, the error message went away, but the data did not come back Firebase Rules:

{ "rules": {
  ".read": true,
     "Flights": {
      ".indexOn": ["from"]
    },
    ".write": false    
} }

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744869645a4598179.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信