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
0 answers

Exoplayer: next and previous buttons

I want implement next and previous buttons below the ExoPlayer. I'm basing my code on this thread: Implementing next button in audio player android and the links in these ones: How to add Listener for next , previous , rewind and forward in…
LeadBox4
  • 83
  • 2
  • 11
0
votes
1 answer

How to pass an image data by implementing parcelable interface from one activity to another?

i have a main activity and second activity. on click of image button in main activity, it directs to second activity and shows a 6 avatar image buttons. i should select one of them and display back onto main activity. Can someone help me do this by…
Amith Y
  • 33
  • 4
0
votes
1 answer

How to learn what is the "key" in Android Studio Bundle?

I'm using a library which is not up to date. (https://github.com/notsukamto/GFIPhotoPicker) It has a onActivityResult function to get activity result. It returns an intent with this function if (selection != null) { …
0
votes
1 answer

Send multiple text items in ShareIntent?

My question is very similar to these ones: Is it possible to share multiple text by using share intent? Passing Multiple text/plain values in share intent I've tried the suggested solutions and it hasn't worked. I'm trying to send two items: "name"…
LeadBox4
  • 83
  • 2
  • 11
0
votes
0 answers

Android Parcelable not transferring all the data when Custom Model had a child that is a list of type Custom Model

I have a model ContentDto, which, among other variables, contains a list of type ContentDto. When I try to pass it to an activity using Parcelable, I get all the data except the child list of type ContentDto (which comes as null). In my adapter: val…
n_r
  • 589
  • 7
  • 17
0
votes
2 answers

Efficient way of passing object between android applications with database

I have an application that shows vocabulary words and it's examples or explanations for 3 levels of a foreign language. Almost 3500 words of text(no image or sound files) stored in local room database. I present selected language level of words on…
0
votes
1 answer

How to properly write Parcelable implementation for an Map?

I haven't found a proper answer on the stackoverflow on the same and confused on how to achieve the right Parcelable implementation for an Map . I suppose for a Map< String , String > below is the correct implementation: public void…
0
votes
0 answers

Ideas on how to set a button to call a specific position from an ArrayList in a separate activity

Long post ahead... Ok, I'm not sure how to explain it so I made a couple of screenshots. Also, I want to start off by saying I'm not looking for somebody to write code for me to copy, or links to specific articles. I just need help figuring out if…
0
votes
1 answer

Unmarshalling unknown type code, List & List

I have an issue unpacking/reading Parcelable that has two troublesome properties that are List of type List , a list that contains Byte arrays, and also a List that contains Strings, the error is Unmarshalling unknown type code. The Parcelable…
cyber101
  • 2,822
  • 14
  • 50
  • 93
0
votes
1 answer

Kotlin: Why @Parcelize requires all serialized properties to be declared in the primary constructor?

In many scenarios, I don't need a field to be passed in from the primary constructor, for example, a field is assigned after initialization and some steps have been taken; a field directly accesses a global variable (such as static variables, such…
Bear Big
  • 93
  • 7
0
votes
1 answer

Using SharedPreferences to save an ArrayList of Subclasses of an Abstract Class

Good afternoon everyone, I'am university studentand I decided to to make a clicker game for fun and it was going really well until now because I came across a "bug" I can't understand: I have an Abstract class called "UpgradesClick" which has all…
ugadbu
  • 3
  • 3
0
votes
1 answer

Memory leak with writeToParcel() called multiple times after onSaveInstanceState()

In some activity, I have to save MVC model as a parcelable. The parcelable is built according to the doc, which I've read more than enough (but who knows, I obviously could have missed something). There is a leak in this activity, but I'm struggling…
Dan Chaltiel
  • 7,811
  • 5
  • 47
  • 92
0
votes
1 answer

Android set image from string parcel

I'm trying to read everything in my external text file and put it into an array list that is send to another class via a parcel class. Although I can get the strings set on textview, but not the image. One of the lines in my external text file…
Brandon Bong
  • 51
  • 1
  • 8
0
votes
0 answers

RuntimeException - Parcel android.os.Parcel@9a7cc8: Unmarshalling unknown type code 7274595

I am trying to send a Parcelable object from one activity to another but when I try to get the object back from the Intent extras, I get: Runtime Exception "Parcel android.os.Parcel@9a7cc8: Unmarshalling unknown type code 7274595" Code: Launching…
Palkesh Jain
  • 412
  • 4
  • 12
0
votes
2 answers

Error while saving ArrayList in saved instance

Actually, I want to save my LinkedList in the saved instance so when a user opens the app again he can access the content already stored in the LinkedList. I know we need to convert the LinkedList into ArrayList in order to store it. While saving…
Ayush Bherwani
  • 2,409
  • 1
  • 15
  • 21