kandi background
Explore Kits

groupie | Groupie helps you display and manage complex RecyclerView layouts | RecyclerView library

 by   lisawray Java Version: 2.9.0 License: MIT

 by   lisawray Java Version: 2.9.0 License: MIT

Download this library from

kandi X-RAY | groupie Summary

groupie is a Java library typically used in User Interface, RecyclerView applications. groupie has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.
Groupie is a simple, flexible library for complex RecyclerView layouts. Groupie lets you treat your content as logical groups and handles change notifications for you -- think sections with headers and footers, expandable groups, blocks of vertical columns, and much more. It makes it easy to handle asynchronous content updates and insertions and user-driven content changes. At the item level, it abstracts the boilerplate of item view types, item layouts, viewholders, and span sizes.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • groupie has a medium active ecosystem.
  • It has 3218 star(s) with 274 fork(s). There are 70 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 40 open issues and 219 have been closed. On average issues are closed in 74 days. There are 5 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of groupie is 2.9.0
groupie Support
Best in #RecyclerView
Average in #RecyclerView
groupie Support
Best in #RecyclerView
Average in #RecyclerView

quality kandi Quality

  • groupie has 0 bugs and 0 code smells.
groupie Quality
Best in #RecyclerView
Average in #RecyclerView
groupie Quality
Best in #RecyclerView
Average in #RecyclerView

securitySecurity

  • groupie has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • groupie code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
groupie Security
Best in #RecyclerView
Average in #RecyclerView
groupie Security
Best in #RecyclerView
Average in #RecyclerView

license License

  • groupie is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
groupie License
Best in #RecyclerView
Average in #RecyclerView
groupie License
Best in #RecyclerView
Average in #RecyclerView

buildReuse

  • groupie releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • groupie saves you 2892 person hours of effort in developing the same functionality from scratch.
  • It has 6287 lines of code, 631 functions and 158 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
groupie Reuse
Best in #RecyclerView
Average in #RecyclerView
groupie Reuse
Best in #RecyclerView
Average in #RecyclerView
Top functions reviewed by kandi - BETA

kandi has reviewed groupie and discovered the below as its top functions. This is intended to give you an instant insight into groupie implemented functionality, and help decide if they suit your requirements.

  • Populate the adapter .
  • Set the content view .
  • helper method to override on RecyclerView
  • Called when the view is scrolled .
  • Calculates the offsets of the items in this RecyclerView .
  • Gets the item for a specific view type
  • Overridden to draw the canvas .
  • Refresh the state of the empty state .
  • Dispatch result to callback .
  • Replaces all child groups .

groupie Key Features

Groupie helps you display and manage complex RecyclerView layouts.

Try it out:

copy iconCopydownload iconDownload
implementation "com.github.lisawray.groupie:groupie:$groupie_version"

Note:

copy iconCopydownload iconDownload
implementation "com.github.lisawray.groupie:groupie:$groupie_version"
implementation "com.github.lisawray.groupie:groupie-databinding:$groupie_version" 

Get started

copy iconCopydownload iconDownload
val adapter = GroupieAdapter()
recyclerView.setAdapter(adapter)

Groups

copy iconCopydownload iconDownload
groupAdapter += HeaderItem()
groupAdapter += CommentItem()

val section = Section()
section.setHeader(HeaderItem())
section.addAll(bodyItems)
groupAdapter += section

Item with Kotlin-Android-Extensions:

copy iconCopydownload iconDownload
implementation "com.github.lisawray.groupie:groupie:$groupie_version"
implementation "com.github.lisawray.groupie:groupie-kotlin-android-extensions:$groupie_version"

Item with data binding:

copy iconCopydownload iconDownload
public class SongItem extends BindableItem<SongBinding> {

    public SongItem(Song song) {
        this(song);
    }    

    @Override public void bind(SongBinding binding, int position) {
        binding.setSong(song);
    }

    @Override public int getLayout() {
        return R.layout.song;
    }
}

Legacy item (your own ViewHolder)

copy iconCopydownload iconDownload
    @Override
    public MyExistingViewHolder createViewHolder(@NonNull View itemView) {
        return new MyExistingViewHolder(itemView);
    }

Kotlin

copy iconCopydownload iconDownload
buildscript {
    ext.kotlin_version = '1.4.21'

    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}

Using with Kotlin-Android-Extensions (deprecated)

copy iconCopydownload iconDownload
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
  ....
  
   // IMPORTANT!  Enables kotlin synthetic view properties.
   // See: https://github.com/Kotlin/KEEP/blob/master/proposals/android-extensions-entity-caching.md
    androidExtensions {
        experimental = true
    }
	
}

dependencies {
    implementation 'com.github.lisawray.groupie:groupie:$groupie_version'
    implementation 'com.github.lisawray.groupie:groupie-kotlin-android-extensions:$groupie_version'
}

View binding

copy iconCopydownload iconDownload
android {
    buildFeatures {
        viewBinding true
    }
}

dependencies {
    implementation "com.github.lisawray.groupie:groupie:$groupie_version"
    implementation "com.github.lisawray.groupie:groupie-viewbinding:$groupie_version"
}

Data binding

copy iconCopydownload iconDownload
android {
    buildFeatures {
        dataBinding true
    }
}

dependencies {
    implementation "com.github.lisawray.groupie:groupie:$groupie_version"
    implementation "com.github.lisawray.groupie:groupie-databinding:$groupie_version"
}

python pandas data frame: single column to multiple columns based on values

copy iconCopydownload iconDownload
df['num_zeros_seen'] = df['ID'].eq(0).cumsum()

#reshape the table
df = df.pivot(
    index='ID',
    columns='num_zeros_seen',
    values='test_data',
)

print(df)
num_zeros_seen    1    2    3
ID                           
0               1.1  2.1  3.1
1               1.2  2.2  3.2
2               1.3  NaN  3.3
3               NaN  NaN  3.4
-----------------------
df['num_zeros_seen'] = df['ID'].eq(0).cumsum()

#reshape the table
df = df.pivot(
    index='ID',
    columns='num_zeros_seen',
    values='test_data',
)

print(df)
num_zeros_seen    1    2    3
ID                           
0               1.1  2.1  3.1
1               1.2  2.2  3.2
2               1.3  NaN  3.3
3               NaN  NaN  3.4

Parse many data from api to html with golang

copy iconCopydownload iconDownload
package main

import (
    "encoding/json"
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
    "os"
    "text/template"
)

type Response struct {
    Artists   string `json:"artists"`
    Locations string `json:"locations"`
    Dates     string `json:"dates"`
    Relation  string `json:"relation"`
}
type Artist struct {
    ID           int      `json:"id"`
    Image        string   `json:"image"`
    Name         string   `json:"name"`
    Members      []string `json:"members"`
    CreationDate int      `json:"creationDate"`
    FirstAlbum   string   `json:"firstAlbum"`
}

var temp *template.Template

func main() {
    temp = template.Must(template.ParseFiles("index.html"))

    http.HandleFunc("/", formHandler) // to define the path/page, where we are going to use the mentioned function
    fmt.Printf("Starting server at port 8080\n")
    if err := http.ListenAndServe(":8080", nil); err != nil { //to initialise our server on :8080
        log.Fatal("HTTP status 500 - Internal server error: %s", err)
    }
}
func formHandler(w http.ResponseWriter, r *http.Request) {
    response, err := http.Get("https://groupietrackers.herokuapp.com/api")
    if err != nil {
        fmt.Print(err.Error())
        os.Exit(1)
    }

    responseData, err := ioutil.ReadAll(response.Body)
    if err != nil {
        log.Fatal(err)
    }

    var responseObject Response

    json.Unmarshal(responseData, &responseObject)
    artist_link, err := http.Get(responseObject.Artists)
    if err != nil {
        fmt.Print(err.Error())
        os.Exit(1)
    }

    artistData, err := ioutil.ReadAll(artist_link.Body)
    if err != nil {
        log.Fatal(err)
    }

    var artists []Artist

    err = json.Unmarshal(artistData, &artists)
    if err != nil {
        log.Fatal(err)
    }

    temp.Execute(w, artists)
}

How to Create a new data frame column based upon GroupyBy Object?

copy iconCopydownload iconDownload
x = df.groupby("Name").agg(list)
print(
    x["Score"]
    .apply(pd.Series)
    .add_prefix("Score")
    .fillna("")
    .rename(columns={"Score0": "Score"})
    .reset_index()
)
  Name  Score Score1 Score2
0    a    4.0    6.0       
1    b    8.0   12.0   34.0
2    c   66.0              
-----------------------
x = df.groupby("Name").agg(list)
print(
    x["Score"]
    .apply(pd.Series)
    .add_prefix("Score")
    .fillna("")
    .rename(columns={"Score0": "Score"})
    .reset_index()
)
  Name  Score Score1 Score2
0    a    4.0    6.0       
1    b    8.0   12.0   34.0
2    c   66.0              
-----------------------
df['Column'] = 'Score' + df.groupby('Name').cumcount().astype(str)

(df.pivot(index='Name', columns='Column', values='Score')
   .reset_index()
   .rename_axis(columns=None)
   .rename(columns={"Score0": "Score"})
)
  Name  Score  Score1  Score2
0    a    4.0     6.0     NaN
1    b    8.0    12.0    34.0
2    c   66.0     NaN     NaN
-----------------------
df['Column'] = 'Score' + df.groupby('Name').cumcount().astype(str)

(df.pivot(index='Name', columns='Column', values='Score')
   .reset_index()
   .rename_axis(columns=None)
   .rename(columns={"Score0": "Score"})
)
  Name  Score  Score1  Score2
0    a    4.0     6.0     NaN
1    b    8.0    12.0    34.0
2    c   66.0     NaN     NaN

Cannot resolve external dependency com.android.tools:desugar_jdk_libs:1.0.9 because no repositories are defined

copy iconCopydownload iconDownload
allprojects {
    repositories {
        google()
        mavenCentral()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}
-----------------------
allprojects {
    repositories {
        google()
        mavenCentral()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}

Call Fragment Method from adapter class

copy iconCopydownload iconDownload
class BindCartItemList(val cartItem: CartList, val actionHandler: ActionHandler) : Item<GroupieViewHolder>() {
    interface ActionHandler {
        fun onCartItemDecreaseClicked(cartItem: CartList)

        fun onCartItemIncreaseClicked(cartItem: CartList)

        fun onCartItemSelectionToggled(cartItem: CartList, shouldBeChecked: Boolean)
    }

    private val mConvert = FormatConversion() // compact conversion

    override fun getLayout() = R.layout.ryr_cartlist_with_select

    override fun bind(viewHolder: GroupieViewHolder, position: Int) {

        viewHolder.itemView.ryr_product_name.text = cartItem.product?.productName
        viewHolder.itemView.ryr_quantity.setText(cartItem.quantity.toString())
        viewHolder.itemView.ryr_product_barcode.text = cartItem.product?.productBarcode

        viewHolder.itemView.ryr_amount.text = mConvert.compactAmount(cartItem.quantity * cartItem.product?.price!!)

        //quantity increase
        viewHolder.itemView.ryr_btn_increase.setOnClickListener {
            actionHandler.onCartItemIncreaseClicked(cartItem)
        }

        //quantity decrease
        viewHolder.itemView.ryr_btn_decrease.setOnClickListener {
            actionHandler.onCartItemDecreaseClicked(cartItem)
        }

        //press container_1 for checkbox
        viewHolder.itemView.ryr_container_1.setOnClickListener {
            val isChecked = viewHolder.itemView.ryr_selected.isChecked
            actionHandler.onCartItemSelectionToggled(cartItem, !isChecked)
        }
    }    
}
class YourFragment: Fragment(), BindCartItemList.ActionHandler {
    ....
-----------------------
class BindCartItemList(val cartItem: CartList, val actionHandler: ActionHandler) : Item<GroupieViewHolder>() {
    interface ActionHandler {
        fun onCartItemDecreaseClicked(cartItem: CartList)

        fun onCartItemIncreaseClicked(cartItem: CartList)

        fun onCartItemSelectionToggled(cartItem: CartList, shouldBeChecked: Boolean)
    }

    private val mConvert = FormatConversion() // compact conversion

    override fun getLayout() = R.layout.ryr_cartlist_with_select

    override fun bind(viewHolder: GroupieViewHolder, position: Int) {

        viewHolder.itemView.ryr_product_name.text = cartItem.product?.productName
        viewHolder.itemView.ryr_quantity.setText(cartItem.quantity.toString())
        viewHolder.itemView.ryr_product_barcode.text = cartItem.product?.productBarcode

        viewHolder.itemView.ryr_amount.text = mConvert.compactAmount(cartItem.quantity * cartItem.product?.price!!)

        //quantity increase
        viewHolder.itemView.ryr_btn_increase.setOnClickListener {
            actionHandler.onCartItemIncreaseClicked(cartItem)
        }

        //quantity decrease
        viewHolder.itemView.ryr_btn_decrease.setOnClickListener {
            actionHandler.onCartItemDecreaseClicked(cartItem)
        }

        //press container_1 for checkbox
        viewHolder.itemView.ryr_container_1.setOnClickListener {
            val isChecked = viewHolder.itemView.ryr_selected.isChecked
            actionHandler.onCartItemSelectionToggled(cartItem, !isChecked)
        }
    }    
}
class YourFragment: Fragment(), BindCartItemList.ActionHandler {
    ....

Python numpy groupby multiple columns

copy iconCopydownload iconDownload
group_idx = df.iloc[:,:3].values
a = df.iloc[:,-1].values

s = group_idx.max(0)+1
lidx = np.ravel_multi_index(group_idx.T,s)

sidx, unq_lidx = pd.factorize(lidx)
pp = np.empty(len(unq_lidx), dtype=int)
pp[sidx] = np.arange(len(sidx))
k1 = group_idx[pp]

a_sums = np.bincount(sidx,a)
out = np.hstack((k1, a_sums.astype(int)[:,None]))
import numba as nb

@nb.njit
def step_sum(a_s, step_mask, out, group_idx_s):
    N = len(a_s)
    count_iter = 0
    for j in nb.prange(3):
        out[count_iter,j] = group_idx_s[0,j] 
    out[count_iter,3] = a_s[0]
    for i in nb.prange(1,N):
        if step_mask[i-1]:
            out[count_iter,3] += a_s[i]
        else:
            count_iter += 1
            for j in nb.prange(3):
                out[count_iter,j] = group_idx_s[i,j] 
            out[count_iter,3] = a_s[i]
    return out

group_idx = df.iloc[:,:3].values
a = df.iloc[:,-1].values

s = group_idx.max(0)+1
lidx = np.ravel_multi_index(group_idx.T,s)

sidx = lidx.argsort()
lsidx = lidx[sidx]
group_idx_s = group_idx[sidx]
a_s = a[sidx]

step_mask = lsidx[:-1] == lsidx[1:]    
N = len(lsidx)-step_mask.sum()
out = np.zeros((N, 4), dtype=int)
out = step_sum(a_s, step_mask, out, group_idx_s)
# get pandas o/p and lexsort
p = df.groupby(['agg_a','agg_b','agg_c'])['to_sum'].sum().reset_index().values
p = p[np.lexsort(p[:,:3].T)]

# Output from our approaches here, say `out`. Let's lexsort
out = out[np.lexsort(out[:,:3].T)]

print(np.allclose(out, p))
-----------------------
group_idx = df.iloc[:,:3].values
a = df.iloc[:,-1].values

s = group_idx.max(0)+1
lidx = np.ravel_multi_index(group_idx.T,s)

sidx, unq_lidx = pd.factorize(lidx)
pp = np.empty(len(unq_lidx), dtype=int)
pp[sidx] = np.arange(len(sidx))
k1 = group_idx[pp]

a_sums = np.bincount(sidx,a)
out = np.hstack((k1, a_sums.astype(int)[:,None]))
import numba as nb

@nb.njit
def step_sum(a_s, step_mask, out, group_idx_s):
    N = len(a_s)
    count_iter = 0
    for j in nb.prange(3):
        out[count_iter,j] = group_idx_s[0,j] 
    out[count_iter,3] = a_s[0]
    for i in nb.prange(1,N):
        if step_mask[i-1]:
            out[count_iter,3] += a_s[i]
        else:
            count_iter += 1
            for j in nb.prange(3):
                out[count_iter,j] = group_idx_s[i,j] 
            out[count_iter,3] = a_s[i]
    return out

group_idx = df.iloc[:,:3].values
a = df.iloc[:,-1].values

s = group_idx.max(0)+1
lidx = np.ravel_multi_index(group_idx.T,s)

sidx = lidx.argsort()
lsidx = lidx[sidx]
group_idx_s = group_idx[sidx]
a_s = a[sidx]

step_mask = lsidx[:-1] == lsidx[1:]    
N = len(lsidx)-step_mask.sum()
out = np.zeros((N, 4), dtype=int)
out = step_sum(a_s, step_mask, out, group_idx_s)
# get pandas o/p and lexsort
p = df.groupby(['agg_a','agg_b','agg_c'])['to_sum'].sum().reset_index().values
p = p[np.lexsort(p[:,:3].T)]

# Output from our approaches here, say `out`. Let's lexsort
out = out[np.lexsort(out[:,:3].T)]

print(np.allclose(out, p))
-----------------------
group_idx = df.iloc[:,:3].values
a = df.iloc[:,-1].values

s = group_idx.max(0)+1
lidx = np.ravel_multi_index(group_idx.T,s)

sidx, unq_lidx = pd.factorize(lidx)
pp = np.empty(len(unq_lidx), dtype=int)
pp[sidx] = np.arange(len(sidx))
k1 = group_idx[pp]

a_sums = np.bincount(sidx,a)
out = np.hstack((k1, a_sums.astype(int)[:,None]))
import numba as nb

@nb.njit
def step_sum(a_s, step_mask, out, group_idx_s):
    N = len(a_s)
    count_iter = 0
    for j in nb.prange(3):
        out[count_iter,j] = group_idx_s[0,j] 
    out[count_iter,3] = a_s[0]
    for i in nb.prange(1,N):
        if step_mask[i-1]:
            out[count_iter,3] += a_s[i]
        else:
            count_iter += 1
            for j in nb.prange(3):
                out[count_iter,j] = group_idx_s[i,j] 
            out[count_iter,3] = a_s[i]
    return out

group_idx = df.iloc[:,:3].values
a = df.iloc[:,-1].values

s = group_idx.max(0)+1
lidx = np.ravel_multi_index(group_idx.T,s)

sidx = lidx.argsort()
lsidx = lidx[sidx]
group_idx_s = group_idx[sidx]
a_s = a[sidx]

step_mask = lsidx[:-1] == lsidx[1:]    
N = len(lsidx)-step_mask.sum()
out = np.zeros((N, 4), dtype=int)
out = step_sum(a_s, step_mask, out, group_idx_s)
# get pandas o/p and lexsort
p = df.groupby(['agg_a','agg_b','agg_c'])['to_sum'].sum().reset_index().values
p = p[np.lexsort(p[:,:3].T)]

# Output from our approaches here, say `out`. Let's lexsort
out = out[np.lexsort(out[:,:3].T)]

print(np.allclose(out, p))

Spark unable to mkdir when using groupie

copy iconCopydownload iconDownload
#!/bin/bash

chmod -R a+rwX /app/checkpoints/

python -u run.py

Android Kotlin: Groupie RecyclerView All Items Added To The Same Expandable Item

copy iconCopydownload iconDownload
private fun mappingData(data: List<Benefit>) {
        val parentList = mutableListOf<ParentItemAdapter>()
        for (i in data) {
            parentList.add(ParentItemAdapter(i.namePlan, requireActivity()))
        }
        groupAdapter.apply {
            for (i in 0 until parentList.size) {
                this += ExpandableGroup(parentList[i]).apply {
                    for (j in data[i].detailBenefit) {
                        add(ChildItemAdapter(j.kindOfGuarantee, j.benefitStatus, j.benefitLimit))
                    }
                }
            }
        }
    }
private fun mappingData(data: List<Benefit>) {
        for (i in data) {
            val parentItem = ParentItemAdapter(i.namePlan, requireActivity())
            val expandableGroup = ExpandableGroup(parentItem, false)
            for (j in i.detailBenefit) {
                val childItem = ChildItemAdapter(j.kindOfGuarantee, j.benefitStatus, j.benefitLimit)
                expandableGroup.add(Section(childItem))
            }
            groupAdapter.add(expandableGroup)
        }
    }
-----------------------
private fun mappingData(data: List<Benefit>) {
        val parentList = mutableListOf<ParentItemAdapter>()
        for (i in data) {
            parentList.add(ParentItemAdapter(i.namePlan, requireActivity()))
        }
        groupAdapter.apply {
            for (i in 0 until parentList.size) {
                this += ExpandableGroup(parentList[i]).apply {
                    for (j in data[i].detailBenefit) {
                        add(ChildItemAdapter(j.kindOfGuarantee, j.benefitStatus, j.benefitLimit))
                    }
                }
            }
        }
    }
private fun mappingData(data: List<Benefit>) {
        for (i in data) {
            val parentItem = ParentItemAdapter(i.namePlan, requireActivity())
            val expandableGroup = ExpandableGroup(parentItem, false)
            for (j in i.detailBenefit) {
                val childItem = ChildItemAdapter(j.kindOfGuarantee, j.benefitStatus, j.benefitLimit)
                expandableGroup.add(Section(childItem))
            }
            groupAdapter.add(expandableGroup)
        }
    }

styling of drop down list box

copy iconCopydownload iconDownload
<div class="form-group">
        @Html.LabelFor(model => model.Office, new { @class = "control-label" })
        @Html.EditorFor(model => model.Office, new { htmlAttributes = new { @class = "form-control", style = "Width:50%" } })
</div>
<div class="form-group">
        @Html.LabelFor(model => model.Group, new { @class = "control-label" })
        @Html.DropDownList("Groups", ViewBag.Groupie as SelectList, new{ @class = "form-control", style = "Width:50%"  })
</div>
<div class="form-group">
        @Html.LabelFor(model => model.Group, new { @class = "control-label" })
        @Html.EditorFor(model => model.Group, new { htmlAttributes = new { @class = "form-control", style = "Width:50%" } })
 </div>

On selecting an item deselect all others for Groupie RecyclerView

copy iconCopydownload iconDownload
// Activity
selected_position = -1

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    super.onViewCreated(view, savedInstanceState)


    rvOptions.layoutManager = LinearLayoutManager(activity)
    adapter = GroupAdapter()
    rvOptions.adapter = adapter


    viewModel = ViewModelProviders.of(activity as MainActivity).get(TestViewModel::class.java)
    val myViewModel = ViewModelProvider(
        this, MyViewModelFactoryForHashMap(arguments?.getString("headerText"))
    ).get(TestViewModel::class.java)

    myViewModel.userMutableLiveData.observe(this, userListUpdateObserver)

}


private val userListUpdateObserver: Observer<Array<ModelTest>?> =
    Observer { userArrayList ->
        for (s in userArrayList!!) {
            adapter.add(
                RecyclerDialogOptionsItem(
                    activity as MainActivity,
                    s.title,
                    s.selected!!,
                    this@MyDialogFragment
                )
            )
        }
    }

override fun onClickItem( position: Int) {
    selected_position = position
    adapter.notifyDataSetChanged()
}

}
// Item

class RecyclerDialogOptionsItem(
private val activity: MainActivity,
private val title: String?,
private var selected: Boolean,
private val adapterListener: AdapterListener
) : Item<GroupieViewHolder>() {

companion object {
    var clickListener: AdapterListener? = null
}


override fun bind(viewHolder: GroupieViewHolder, position: Int) {


    viewHolder.apply {

        with(viewHolder.itemView) {

            tvTitle.text = title

            clickListener = adapterListener
            if (activity.selected_position == position) {
                    ivChecked.visible()

                } else {
                    ivChecked.invisible()
                }

            itemView.setOnClickListener {
                clickListener?.onClickItem(adapterPosition)

            }


        }

        
    }

}


override fun getLayout() = R.layout.rv_options_item_row


interface AdapterListener {
    fun onClickItem(position: Int)
}

}

Community Discussions

Trending Discussions on groupie
  • Setting data to Firebase Causing My app to restart constantly with no Error in Logical
  • python pandas data frame: single column to multiple columns based on values
  • Android API 31 FLAG_IMMUTABLE Error using Firebase Auth UI
  • Parse many data from api to html with golang
  • Memory leaks when using static context items in android
  • Error: com.xwray.groupie.GroupieViewHolder cannot be cast to com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder
  • How to Create a new data frame column based upon GroupyBy Object?
  • Cannot resolve external dependency com.android.tools:desugar_jdk_libs:1.0.9 because no repositories are defined
  • Call Fragment Method from adapter class
  • Python numpy groupby multiple columns
Trending Discussions on groupie

QUESTION

Setting data to Firebase Causing My app to restart constantly with no Error in Logical

Asked 2022-Mar-06 at 03:20

I have been developing this app since 2019 and I had a released version of it and I was working on an update so there is a new version of the Android Studio came out I have updated Android Studio to Android Studio Bumblebee | 2021.1.1 Patch 1 my kotlin_version = "1.6.10" and compileSdk 31 minSdkVersion 19, targetSdkVersion 31 android 11

I was solving some errors at the beginning like duplicate classes and stuff until I faced this error with firebase when setting the data to firebase Database or Firestore, before this update my Code was working fine and I didn't change much I just added new functions to the app like inAppReview,

what is happening is that whenever I'm setting data or update some existing data in Firebase Databse or Firestore the app restart and leave no error to detect in the Logcat, Logcat will not be cleared it is just wont show error at the moment of restart, and my app will automatically set a new data to the Firestore or Firebase and some times restart when reading values,

In the new update, I have come across errors like SQLiteConstraintException: UNIQUE constraint failed and E/android.vendin: Not starting debugger since process cannot load the jdwp agent. i dont know if it's related but those are showing.

this is a serious problem guys, I have an iOS version same app written in Swift they both share the same functions to write and read to the database I mean same code different Languages connected to the same database there is no errors everything works fine on iOS with the firebase itself, and the same code was working before this update that's mean there's no problem with my code, please if anyone knows anything or came across this kind of situation let me know I need some help, I'm stuck for a week now I have been searching all over the internet Didn't found any answer, if anyone needs a further declaration or sharing some code please let me know

emulator runing R version and the app was tested on a real Device SamsungNote S21

Note: if I Run the app the first time and write to firebase the app will crash or as I mentioned restart.

Note: but if I wrote to firebase and Re-run my app before the app write again or before the crash the app will works fone

project Gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.6.10"
    repositories {
        google()
//        jcenter()
        mavenCentral()
//        maven { url "https://maven.google.com" }
        maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.3.8'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'

    }

}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()

        maven { url 'https://jitpack.io' }
//        maven { url 'https://mapbox.bintray.com/mapbox' }
        maven {
            url 'https://api.mapbox.com/downloads/v2/releases/maven'
            authentication {
                basic(BasicAuthentication)
            }
            credentials {
                // Do not change the username below.
                // This should always be `mapbox` (not your username).
                username = 'mapbox'
                // Use the secret token you stored in gradle.properties as the password
                password = "mapboxpass"
            }
        }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

app Gradle

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: "androidx.navigation.safeargs.kotlin"
apply plugin: 'com.google.firebase.crashlytics'

android {
    compileSdk 31

    defaultConfig {
        applicationId "id"
        minSdkVersion 19
        targetSdkVersion 31
        versionCode 5
        versionName "1.0.4"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    androidExtensions{
        experimental = true
    }


}


dependencies {

    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.annotation:annotation:1.3.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    testImplementation 'junit:junit:4.12'
    testImplementation("androidx.room:room-testing:2.4.2")
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation("androidx.browser:browser:1.3.0")
    implementation("androidx.annotation:annotation:1.3.0")
    // To use the Java-compatible @Experimental API annotation
    implementation("androidx.annotation:annotation-experimental:1.2.0")

    implementation("com.google.android.play:core:1.10.3")
    implementation("com.google.android.play:core-ktx:1.8.1")
    implementation 'com.google.android.gms:play-services-basement:18.0.0'

    implementation 'com.github.chintan369:Geo-FireStore-Query:1.1.0'
    implementation platform('com.google.firebase:firebase-bom:29.1.0')
    implementation 'com.google.firebase:firebase-auth-ktx'
    implementation 'com.google.firebase:firebase-storage-ktx'
    implementation 'com.google.firebase:firebase-firestore-ktx'
    implementation 'com.google.firebase:firebase-database-ktx'
    implementation 'com.google.firebase:firebase-config-ktx'
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.google.firebase:firebase-messaging-ktx'
    implementation 'com.google.firebase:firebase-crashlytics-ktx'
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.5.0'
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation "com.xwray:groupie:2.8.0"
    implementation "com.xwray:groupie-kotlin-android-extensions:2.8.0"
    implementation "com.xwray:groupie-databinding:2.8.0"
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.1.1'

    implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0'){
        exclude group: 'group_name', module: 'module_name'
    }
    implementation 'com.mapbox.mapboxsdk:mapbox-android-core:3.1.0'
    implementation 'com.google.android.gms:play-services-location:19.0.1'
    implementation "com.mapbox.mapboxsdk:mapbox-android-telemetry:6.1.0"
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.11.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v8:0.7.0'

    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.8.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.8.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:5.8.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6'
    implementation ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6') {
        transitive = true
    }

    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
    implementation 'com.github.everhad:AndroidRatingStar:v1.0.4'
    implementation 'com.eyalbira.loadingdots:loading-dots:1.0.2'


}

AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"
        tools:ignore="ScopedStorage"/>
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera" />

    <application
        android:allowBackup="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="false"
        tools:replace="android:supportsRtl"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        android:requestLegacyExternalStorage="true"
        tools:targetApi="m"
        android:protectionLevel="signature|setup|privileged"
        android:networkSecurityConfig="@xml/network_security_config"
        tools:ignore="UnusedAttribute">

Logcat No Filters - Error

2022-03-04 02:57:45.635 11867-20246/? E/SQLiteDatabase: Error inserting flex_time=1929000 job_id=-1 period=3859000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355465605 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
    android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONSTRAINT_UNIQUE)
        at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
        at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:938)
        at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
        at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:88)
        at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1701)
        at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1570)
        at apla.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):78)
        at apkp.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):196)
        at apkp.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):20)
        at apkp.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):190)
        at apgy.run(:com.google.android.gms@201817022@20.18.17 (040700-311416286):8)
        at sji.b(:com.google.android.gms@201817022@20.18.17 (040700-311416286):12)
        at sji.run(:com.google.android.gms@201817022@20.18.17 (040700-311416286):7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at spj.run(:com.google.android.gms@201817022@20.18.17 (040700-311416286):0)
        at java.lang.Thread.run(Thread.java:923)
2022-03-04 02:57:45.716 11867-20246/? E/SQLiteDatabase: Error inserting flex_time=1929000 job_id=-1 period=3859000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355465690 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
2022-03-04 02:58:19.783 9181-9181/? E/NotificationService: Muting recently noisy 0|com.qp.delevare_|0|null|10155
2022-03-04 02:58:24.413 9130-24001/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.414 9130-24001/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.463 423-423/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.464 423-423/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.633 9130-24001/? E/ion: ioctl c0044901 failed with code -1: Inappropriate ioctl for device
2022-03-04 02:58:24.660 9130-24001/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.664 423-941/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.706 423-24007/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.709 9130-9365/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:34.751 11867-19785/? E/SQLiteDatabase: Error inserting flex_time=1880000 job_id=-1 period=3761000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355514744 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
2022-03-04 02:58:34.879 11867-20246/? E/SQLiteDatabase: Error inserting flex_time=1879000 job_id=-1 period=3760000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355514866 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
2022-03-04 03:11:16.563 9181-9181/? E/RemoteAugmentedAutofillService: Bad service name for flags 1048704: com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiAugmentedAutofillService
2022-03-04 03:11:25.574 23552-24315/com.qp.delevare_ E/FirebaseCrash: Failed to report uncaught exception
    java.lang.SecurityException: getDataNetworkTypeForSubscriber
        at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
        at android.os.Parcel.createException(Parcel.java:2357)
        at android.os.Parcel.readException(Parcel.java:2340)
        at android.os.Parcel.readException(Parcel.java:2282)
        at com.android.internal.telephony.ITelephony$Stub$Proxy.getNetworkTypeForSubscriber(ITelephony.java:8762)
        at android.telephony.TelephonyManager.getNetworkType(TelephonyManager.java:3021)
        at android.telephony.TelephonyManager.getNetworkType(TelephonyManager.java:2985)
        at aqi.a(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):164)
        at com.google.firebase.crash.internal.api.FirebaseCrashApiImpl.a(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):2)
        at com.google.firebase.crash.internal.api.FirebaseCrashApiImpl.reportUncaughtException(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):2)
        at apv.a(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):10)
        at mi.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):4)
        at android.os.Binder.transact(Binder.java:1043)
        at com.google.android.gms.internal.crash.zza.transactAndReadExceptionReturnVoid(Unknown Source:20)
        at com.google.android.gms.internal.crash.zzn.zzb(Unknown Source:18)
        at com.google.android.gms.internal.crash.zzg.zzd(Unknown Source:13)
        at com.google.android.gms.internal.crash.zzc.run(Unknown Source:12)
        at com.google.android.gms.internal.crash.zzg.run(Unknown Source:15)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
2022-03-04 03:11:27.463 9181-9211/? E/ActivityTaskManager: Second failure launching com.qp.delevare_/.TabbarActivity, giving up
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(BinderProxy.java:540)
        at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:2504)
        at android.app.servertransaction.ClientTransaction.schedule(ClientTransaction.java:136)
        at com.android.server.wm.ClientLifecycleManager.scheduleTransaction(ClientLifecycleManager.java:47)
        at com.android.server.wm.ActivityStackSupervisor.realStartActivityLocked(ActivityStackSupervisor.java:863)
        at com.android.server.wm.ActivityStackSupervisor.startSpecificActivity(ActivityStackSupervisor.java:971)
        at com.android.server.wm.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:1934)
        at com.android.server.wm.ActivityStack.resumeTopActivityUncheckedLocked(ActivityStack.java:1511)
        at com.android.server.wm.ActivityRecord.makeActiveIfNeeded(ActivityRecord.java:4714)
        at com.android.server.wm.EnsureActivitiesVisibleHelper.setActivityVisibilityState(EnsureActivitiesVisibleHelper.java:160)
        at com.android.server.wm.EnsureActivitiesVisibleHelper.lambda$Bbb3nMFa3F8er_OBuKA7-SpeSKo(Unknown Source:0)
        at com.android.server.wm.-$$Lambda$EnsureActivitiesVisibleHelper$Bbb3nMFa3F8er_OBuKA7-SpeSKo.accept(Unknown Source:12)
        at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:307)
        at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201)
        at com.android.internal.util.function.pooled.OmniFunction.accept(OmniFunction.java:92)
        at com.android.server.wm.ActivityRecord.forAllActivities(ActivityRecord.java:3625)
        at com.android.server.wm.WindowContainer.forAllActivities(WindowContainer.java:1350)
        at com.android.server.wm.WindowContainer.forAllActivities(WindowContainer.java:1344)
        at com.android.server.wm.EnsureActivitiesVisibleHelper.process(EnsureActivitiesVisibleHelper.java:104)
        at com.android.server.wm.ActivityStack.ensureActivitiesVisible(ActivityStack.java:1310)
        at com.android.server.wm.TaskDisplayArea.ensureActivitiesVisible(TaskDisplayArea.java:1790)
        at com.android.server.wm.DisplayContent.ensureActivitiesVisible(DisplayContent.java:5524)
        at com.android.server.wm.RootWindowContainer.ensureActivitiesVisible(RootWindowContainer.java:2002)
        at com.android.server.wm.RootWindowContainer.ensureActivitiesVisible(RootWindowContainer.java:1984)
        at com.android.server.wm.ActivityStack.completePauseLocked(ActivityStack.java:1244)
        at com.android.server.wm.ActivityRecord.activityPaused(ActivityRecord.java:4937)
        at com.android.server.wm.ActivityRecord$1.run(ActivityRecord.java:712)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.os.HandlerThread.run(HandlerThread.java:67)
        at com.android.server.ServiceThread.run(ServiceThread.java:44)
2022-03-04 03:11:29.828 12424-12475/? E/MDD: DownloadProgressMonitor: Can't find file group for uri: android://com.google.android.googlequicksearchbox/files/sharedminusonemodule/shared/SharedMinusOneData.pb.tmp
2022-03-04 03:11:32.973 9181-10230/? E/system_server: Invalid class loader spec: =UnsupportedClassLoaderContext=
2022-03-04 03:11:32.973 9181-10230/? E/PackageDexUsage: Unsupported context?
2022-03-04 03:11:35.861 11867-16474/? E/SQLiteDatabase: Error inserting flex_time=1098000 job_id=-1 period=2198000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646356295857 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0

ANSWER

Answered 2022-Mar-06 at 03:20

I see there are no problems with your dependencies and I think what you have is that you write data to the firebase database after getting some data using ValueEventListener, so even if your activity has destroyed ValueEventListener will still listen in the previous Activity according to this answer https://stackoverflow.com/a/63636051/8793968 @ and this answer https://stackoverflow.com/a/63636048/8793968 @ so it will restart and show no errors

Source https://stackoverflow.com/questions/71304040

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install groupie

Use a GroupieAdapter anywhere you would normally use a RecyclerView.Adapter, and attach it to your RecyclerView as usual.

Support

Contributions you say? Yes please!.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.