android


Android sometimes getSerializableExtra returns null


I publish an app that works normally but sometimes (very rarely) getSerializableExtra method return null (detected with Crashlytics).
Does anyone know why?
Exemple Launch intent:
if (obj != null) {
Intent intent = new Intent(getActivity()/this, ActivityToLaunch.class);
intent.putExtra(ActivityToLaunch.ARGS, obj);
startActivity(intent);
}
Getting data in onCreate methode :
getIntent().getSerializableExtra(ARGS);
My obj is a custom serializable class, for exemple :
public class Program implements Serializable, Comparable<Program> {
private long idProgram;
private String name;
public long getIdProgram() {
return idProgram;
}
public void setIdProgram(long idProgram) {
this.idProgram = idProgram;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
#Override
public int compareTo(#NonNull Program another) {
return getName().compareTo(another.getName());
}}

Related Links

Activity not found, no idea why
AsyncTask infinite loop
Passing values of EditText and Spinner from an Activity into TextView of another Activity
How to read sms response line by line
Implementing Android LocationListener in a widget
MediaStore.Video.Media.DATE_MODIFIED format
why HitTestResult.getType() returns UNKNOWN_TYPE
Dynamically change the margins of RelativeLayout which is getting inflated via xml
Android - MainActivity keeps on instantiating
XML error - Doing Google Android NDK Lesson 1
border for textview via coding
Android OurOfMemoryError: Bitmap exceed VM budget during Bitmap.createBitmap
ClassCastException and Unable to instantiate activity on Android
formatting inputstream data from database in Android
sending my JSON object from the selected index on a listview to my next activity (android)
Converting Milliseconds String to formatted date String in SimpleCursorAdapter

Categories

HOME
hyperlink
delphi-7
prism
spark-streaming
ng-idle
wakanda
rdbms
jax-rs
object
youtube-data-api-v3
google-cloud-functions
switch-statement
square
echo
nstableheaderview
flume
project
appcelerator-studio
line
tput
supervisor
azure-powershell
null-pointer
solrcloud
sar
imagemap
r-mice
dataflow-diagram
gmock
data.stackexchange.com
opentk
interbase
android-sharedpreferences
fragment-backstack
linked-data
genexus-sd
wcag
spotipy
subclass
quantlib
bioinformatics
mockjax
weather
cognos-bi
database-comparison
turfjs
protege4
sharepoint-workflow
git-rewrite-history
graphhopper
z-notation
kill
watchface
plr
contract
xmldocument
stylecop
phpdbg
vaadin-elements
dtsearch
bluez
corruption
context-switch
static-cast
payload
filenet
cvxpy
slackware
xcode-server
vulcanize
synonym
appscale
pre-build-event
rasterize
atan2
assertion
page.js
dulwich
keyup
teamcity-9.1
git-ftp
bufferedinputstream
qtwebengine
exceldatareader
rapidsvn
appserver
cbind
encryption-asymmetric
spring-remoting
authlogic
clickbank
scrypt
model-driven-development
diem
alice
android-sdk-2.3
argouml
pdfviewer
apache-whirr
virtualpathprovider
apache-commons-dbutils
convention
ikimagebrowserview
uideviceorientation
updatesourcetrigger
easyb
strtod
dsl-tools
complex-event-processing

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App