Questions tagged [parcelable]

parcelable refers to the capability of an object to be converted to a parcel, a container for reading and writing data of various type, using type specific rather than generic serialization

parcelable is defined in the Android API as as interface for classes whose instances can be written to and restored from a parcel

References

1664 questions
0
votes
1 answer

How to serialize a data class in Android Kotlin using moshi

@JsonClass(generateAdapter = true) data class Note(val name) Do I need to parcelize the above model I am using Moshi and change it to something like @Parcelize @JsonClass(generateAdapter = true) data class Note(val name) : Parcelable Why do we…
luckysing_noobster
  • 1,933
  • 5
  • 24
  • 50
0
votes
1 answer

Error with Parcelable / Parceler when minifyEnabled true

I am getting the following error when I set minifyEnabled true: Unable to find generated Parcelable class for com.codeworks.myapp.FirestoreModel, verify that your class is configured properly and that the Parcelable class…
Kellin Strook
  • 487
  • 1
  • 5
  • 18
0
votes
1 answer

How to set few fragments that have same structure in viewpager?

I'm a beginner who learning Android basic course I want to make 6 fragments that have same structure (only title, image, texts will be different) by using single fragment. I tried this code but I can see only one fragment. MainActivity.java public…
0
votes
3 answers

Array list (CardView) with same layout but different data

Edited Post: 21 April 2020 So I am getting a NullPointerException when I am now trying to call my description onto my new Customer Activity. I can't seem to call my description from my ArrayList to the new Activity TextView. I might have missed out…
0
votes
0 answers

pass objects of class between activities with parcelable

I'am trying to send a class object between two actvities with parcelable, it seems to be well applied,i have implement parcelable and then pass it via intent but my application stop whithout doing anything, i need some help!! This is my class…
F.VIDA
  • 1
  • 2
0
votes
1 answer

Activity does not receive List when sending it with Intent
I am currently struggling with sending an intent that has an Object which contains a List. Basically I can send the right data to another activity, but I am failing to get the List in the data. Sorry, I really don't know how to describe it. The…
riceplant
  • 21
  • 9
0
votes
1 answer

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 on CardView

I am getting this error as I am not able to pass my parcelable to another activity. I would like to have the Image and the text from my cardView to be passed onto my new activity for each cardview. However, I am receiving thisd error called…
0
votes
1 answer

Kotlin: Data pass using putExtra and Parcelable

I'm trying to pass data use putExtra function. My goal is described in the picture below. I set a button click listener with out putExtra in First Activity like this; downloadButton?.setOnClickListener { val…
Sean Kim
  • 25
  • 2
  • 9
0
votes
1 answer

How to make parcelable class with nested classes

I'm new in Android dev. And I was faced with the fact that I need to redo my class into Parcelable class. And the main problem with it is that i have 3 nested classes into my class. It is my code: class Test (var id: Int, var…
Lemonyara
  • 53
  • 4
0
votes
1 answer

Receiving null Parcelable object Android

I'm trying to pass an object from my RecyclerView adapter to a fragment using parcelable. However when I try to receive the data, the bundle is null. I've looked at other examples, but I can't see where I'm going wrong. Parcelable class public class…
bateler8
  • 95
  • 6
0
votes
1 answer

Selector for Cloudant is not Parcelable

I try to pass Selector from an activity to another via intent, with this code: Selector mSelector = gt("_id", 0); intent.putExtra(EXTRA_QUERY_SELECTOR, mSelector); I get this error message Parcel: unable to marshal value. I have tried this…
user1564762
  • 745
  • 2
  • 11
  • 18
0
votes
0 answers

Android Kotlin Parcelize android extension giving error

I have used Parcelize property of Android Extension to get Parcelable data class in Kotlin . It greatly reduces boiler plate code . Initially it was in experimental mode but now its stable . I have followed tutorial from below link Parcelable…
Yatin
  • 2,969
  • 9
  • 34
  • 68
0
votes
1 answer

Getting kotlin.TypeCastException when trying to use parcelable on an ArrayList variable which contains null fields

I literally started yesterday with using Kotlin, so I am still having a hard time understanding the underlying principles. I want to send an object via intent to another activity and implemented parcelable on the object. The object contains some…
Benny
  • 839
  • 16
  • 32
0
votes
2 answers

Broadcasting a list using sendBroadcast()

I have a list which I am trying to broadcast with the use of intents. After following online tutorials, I was adviced to use Parcelable in order to send this data. However, I keep getting this error in logcat: Caused by:…
user12745857
0
votes
0 answers

App crashes when I pass an object that extends parcelable interface

I am trying to build a simple app that passes objects between activities so I could use the Class properties in the recyclerview later on. I have created the "Member data class" and extended it so that it uses the parelable interface. data class…