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

Android crash when try to open browser(or any other implicit intent) intent

I am trying to open browser intent from my application on the click of a button. I am getting the following crash for the browser application: 02-05 14:16:00.526: E/AndroidRuntime(25626): java.lang.RuntimeException: Unable to start activity…
user1041858
  • 947
  • 2
  • 15
  • 32
0
votes
1 answer

Android Application MainActivity keeps Resetting Information

I am working on a simple application that passes a parcelable from one activity to another. In MainActivity, I have a LinkedList that holds the information taken from the parcelable. However, each time i return to MainActivity, the Object previously…
Hermes Trismegistus
  • 515
  • 2
  • 5
  • 16
0
votes
1 answer

Android - MyParceableClassInner[] inside MyParceableClassOuter

I'm trying to pass a custom parceable class which contains an array of another custom parceable class between activities. I tried to follow the advice here, but it didn't work for me. This is the inner class, it works fine when passed alone: import…
thekthuser
  • 706
  • 1
  • 12
  • 28
0
votes
1 answer

does Bundle.putSerializable(key, ArrayLis) have size limit

Trying to pass a list of Data (Parcelable) to a activity using putSerializable, ArrayList dataList = ...; Bundle args = new Bundle(); args.putSerializable(KEY, dataList); intent.putExtras(args); startActivity(intent); app crashes and shows…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

Parcelable object casting error in Android

I have a class that implements parcelable: public final class Product implements Parcelable { private Integer ID; private String title; public Product(Parcel source) { this.ID = source.readInt(); this.title =…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
1 answer

Got nullpointer when trying to pass object to activity

I'm making a simple Android application for a project. I have an activity that show a List View of conversation and when I click on one of the listed conversation I want to show messages in it. For this purpose I used a Parcelable object. import…
0
votes
2 answers

empty Bundle when sending parcelable arraylist in android fragment

i'm working on android project, i want to send an arraylist of object that contain latitude and longitude from a fragment to another fragment to show multiple marker on the map but i get an empty argument. First Fragment private…
Ali Noureddine
  • 324
  • 5
  • 20
0
votes
2 answers

Class not found when unmarshallin

I have this DTO class in my android project: package com.example.stopcall.app.dal.dto; import android.os.Parcel; import android.os.Parcelable; public class Phone implements Parcelable { public int id; public String phone; public…
Elad Benda2
  • 13,852
  • 29
  • 82
  • 157
0
votes
0 answers

Parcelable is really usefull?

I tried to send a parcel from the mainActivity to a fragment and i noticed a strange effect. When you implement parcelable, android require to implement "writeToParcel" and "describeContents". The strange effect is, if you write something inside…
acs-team
  • 602
  • 6
  • 14
0
votes
1 answer

sending intent with a parcelable extra from widget crashes on activity startup

I have a widget that contains few buttons. when pressed each button opens my main app and sends a different object to it. the objects are passed down as parcelable extras. however when the activity starts any method that tries to access the extras…
Gabriel H
  • 1,558
  • 2
  • 14
  • 35
0
votes
0 answers

Null pointer Exception in Parcelable android

i want to send list of array objects from activity to fragments so that i create parcelable class, data's being passed and everything works fine, but when ever i pressed home button it throws NPE in writeToParcel method. Please provide me some…
Androidcuckoo
  • 121
  • 2
  • 18
0
votes
1 answer

Reading Vector parcelable

I have a problems getting parameters using parcelables. When I call getIntent().getExtras().getParcelable("map"); I have a problem because of a problem with a Vector. I have 2 parcelable classes: public class Point implements Parcelable{ private…
0
votes
1 answer

Parcelable object that receives passed data coming up null

I'm working on an Android app that stores contact information, I'm trying to add a feature that when you click on a contact item in the ListView it will send the contact object that implements parcelable over two the second activity. This is Where I…
0
votes
1 answer

Implementing Parcelable for a custom 2D array

In order to pass my 2D array in a new activity, I came up with the approach to wrap it and implement the Parcelable interface. Unfortunately, when I use Intent.getParcelableExtra i get java.lang.NullPointerException, which means that I am most…
0
votes
1 answer

Parcel an array object of costum objects

I have a class Tok that has some variables (int, int, String ... ) I also have a class TokList that extends ArrayList. In my MainActivity.java I created an TokList instance ( TokList tl = ... ), and filled it with some Toks. I want to pass…