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 add a Drawable object to a Parcelable object when I save the state of a custom view?

I am creating a custom view in android application. Custom view has Drawable object that is a vector image and is stored in folder res/drawable/ I want to save its state, so I create class SavedState that I use in methods onSaveInstanceState and…
0
votes
1 answer

@IgnoredOnParcel annotation doesn't work for @Parcelize in Kotlin

I try to ignore a field when using the @Parcelize annotation in Kotlin so I am using @IgnoredOnParcel, Plz guide me, on how to solve this error error: Cannot figure out how to save this field into database. You can consider adding a type converter…
Bolt UIX
  • 5,988
  • 6
  • 31
  • 58
0
votes
1 answer

My object is getting wrecked in the transfer from activity to activity, using Parcelable, in Android Studio

To give you a little context, I try to pass my 'match' object from the GamesBottomActivity to the GameActionsActivity. My Match model is implementing Parcelable and I have well implemented the required methods from the interface. Here it is. public…
Jmx
  • 1
  • 2
0
votes
2 answers

Parcelable error occurred while using the Room

Parcelable error occurred while using the Room. I'm studying Room, but I don't have much common sense yet. So I don't know why I use Parcelable. I think there was an error when changing the format of Room to one to many. error mesage : error:…
stev3j
  • 1
  • 2
0
votes
2 answers

getParcelableArrayListExtra causes a different type to be set to a variable

The problem starts with getParcelableArrayListExtra doesn't support type check when we try to set it to a variable. Let me give an example as basic as I can. A User Class. import kotlinx.parcelize.Parcelize import android.os.Parcelable …
UmutTekin
  • 216
  • 2
  • 15
0
votes
1 answer

Parcelable through broadcastReceiver returns null

I am trying to pass this custom list object to the broadcast receiver. For that i am passing it like this: Inside activity: intent.putParcelableArrayListExtra(PARCEL_LIST_GEO, parcelItems.toArrayList()) Inside broadcastReceiver: val parcelList =…
0
votes
3 answers

How to get ParcelableExtra from RecyclerView

I had one learning project that require RecyclerView item to send his detailed data to another activity with getParcelableExtra, my problem is when I clicked the item, the data is null on detailsActivity then I check it with the log.d, and yes it's…
0
votes
0 answers

Class Not Found When Unmarshalling: com.example.Parcelable.User

I'm facing following Errors/Exceptions when receiving data from one App to another App in Kotlin (Android): Class Not Found When Unmarshalling: com.example.Parcelable.User mExtras=Bundle[{)}] mParcelledData=null mMap=size 0 Also, In MainActivtiy:…
0
votes
3 answers

How do i pass objects from 1 class to another?

I have 3 classes: MainActivity, homePage and createPage; and a list List recipeList = new ArrayList<>() in MainActivity. The user enters the homePage from the MainActivity. From homePage, the user can enter createPage and create a new…
Kelven Lim
  • 73
  • 8
0
votes
1 answer

RuntimeException: Exception inflating kotlin:navigation/nav_graph

We had a RuntimeException while we put a safeArgs into the navigation graph and this crash didn't give us any more guide to fix it. In the first impression, we were following this to ensure that those classes were Parcelize or not. Therefore, those…
Majid Khosravi
  • 129
  • 2
  • 4
0
votes
1 answer

Passing parcelized Kotlin data class from activity to activity does not persits data

I tried to pass a class between activities using parcelize. For this I got A class which has other classes as members: @Parcelize class Entry(var uid_sensor: String = "No-Id", val firstConfig: fConfig= fConfig(), val SecondConfig: sConfig =…
agentsmith
  • 1,226
  • 1
  • 14
  • 27
0
votes
1 answer

Android, How to make a @Parcelize with builder

Having a Parcelable which has a lot members, and it has a private constructor so it can only be instantiated through a Builder. (And this class is also used in Java side of the code.) Now would like to use @Parcelize to remove some of the helper…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

Why some Bundle objects will update by reference and some not?

I have a fragment and I create a new Instance of it, in my Activity, Also I'm passing a Parcelable data class to the fragment like this: fun newInstance( use: User, date: Date ): CalendarDialogFragment { …
Ehsan
  • 2,676
  • 6
  • 29
  • 56
0
votes
1 answer

Bundle does not fully received

I am facing a problem with sending data through the bundle. Intent toAudio = new Intent(TourDescription.this, Audio.class); toAudio.putParcelableArrayListExtra("poi", arraypoi); startActivity(toAudio); here am sending arraypoi which is an…
thejaswi
  • 175
  • 4
  • 13
0
votes
1 answer

How do I create a new object on every button click?

I am creating a notes app, and I've all but finished it. My app starts on the main activity, which shows a recylcerView displaying all of the saved notes. To create a new note, you press a button, which sends you to another activity where you write…