I have connection with firebase I can upload some data from application but after seconds program goes to main activity(crash).
What does it mean? How to fix it?
2021-01-07 00:04:15.446 383-383/? E/netmgr: qemu_pipe_open_ns:62: Could not connect to the 'pipe:qemud:network' service: Invalid argument
2021-01-07 00:04:15.446 383-383/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2021-01-07 00:04:16.290 203-208/? E/android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup34: Permission denied
2021-01-07 00:04:16.299 203-208/? E/android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup35: Permission denied
2021-01-07 00:04:16.286 203-203/? W/Binder:203_2: type=1400 audit(0.0:4735): avc: denied { read } for name="wakeup34" dev="sysfs" ino=18468 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
2021-01-07 00:04:16.294 203-203/? W/Binder:203_2: type=1400 audit(0.0:4736): avc: denied { read } for name="wakeup35" dev="sysfs" ino=18528 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
2021-01-07 00:04:17.584 3924-3960/com.google.android.inputmethod.latin I/VoiceInputManagerWrapper: VoiceInputManagerWrapper.shutdownVoiceInternal():95 shutdownVoiceInternal()
2021-01-07 00:04:20.705 8914-31452/com.google.android.googlequicksearchbox W/GmsLocationProvider: Error removing location updates: 16
2021-01-07 00:04:22.447 392-392/? E/wifi_forwarder: qemu_pipe_open_ns:62: Could not connect to the 'pipe:qemud:wififorward' service: Invalid argument
2021-01-07 00:04:22.447 392-392/? E/wifi_forwarder: RemoteConnection failed to initialize: RemoteConnection failed to open pipe
2021-01-07 00:11:27.495 570-791/system_process E/InputDispatcher: channel '4af1bfb com.example.shopassistantproject/com.example.shopassistantproject.ProductListActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
DownloadProgressMonitor: Can't find file group for uri: android://com.google.android.googlequicksearchbox/files/sharedminusonemodule/shared/SharedMinusOneData.pb.tmp
2021-01-07 00:11:30.529 32094-32094/com.example.shopassistantproject E/libc: Access denied finding property "ro.serialno"
EDIT:
It is because of my adapter
var adapter = MyAdapter(this, list, ref)
When I delete this line it works and doesn't crash.
My adapter:
import android.app.Application
import android.content.Context
import android.util.Log
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.example.shopassistantproject.databinding.ListElementBinding
import com.google.firebase.database.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
class MyAdapter(val context: Context, val list: ArrayList<String>, val ref: DatabaseReference) : RecyclerView.Adapter<MyAdapter.MyViewHolder>() {
lateinit var product: String
init {
ref.addChildEventListener(object: ChildEventListener {
override fun onChildAdded(snapshot: DataSnapshot, previousChildName: String?) {
CoroutineScope(IO).launch {
list.add(snapshot.child("product123").value as String)
withContext(Main) {
notifyDataSetChanged()
}
}
}
override fun onChildChanged(snapshot: DataSnapshot, previousChildName: String?) {
CoroutineScope(IO).launch {
list.remove(snapshot.value as String)
list.add(snapshot.value as String)
withContext(Main) {
notifyDataSetChanged()
}
}
}
override fun onChildRemoved(snapshot: DataSnapshot) {
CoroutineScope(IO).launch {
list.remove(snapshot.value as String)
withContext(Main) {
notifyDataSetChanged()
}
}
}
override fun onChildMoved(snapshot: DataSnapshot, previousChildName: String?) {
TODO("Not yet implemented")
}
override fun onCancelled(error: DatabaseError) {
TODO("Not yet implemented")
}
})
}