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

Controll buffering in VideoView
Trying to implement swipe movement
Email without user intervention
Android - save strings/variables? [closed]
On click item in gridview
Remove the Unfortunately the app has stopped message in android(Not its cause, but message itself)
How do different Android app components with different lifecycles share objects?
Android setOnTouchListener not working in fragment
Sending SMS from an application in android
Manifest Merger error when using Espresso to test a project with minSdkVersion=“14”
Writing to a File in Android
Android send udp broadcast silently fails
Best way to pass a SurfaceView to android.media.MediaPlayer
Android : How to set edittext text just in first touch after activity launch
Battery charging
SMS : Columns “_id” does not Exist

Categories

HOME
django
xml
hyperlink
codenvy
forms
apache-jena
pyqt
composite-primary-key
sublimetext
pdfbox
database-normalization
entity-framework-core
dojo
emscripten
maxscript
data-visualization
crystal-reports-2013
pkcs#11
flume
categorical-data
owin
octave
ipmitool
renjin
plink
http-post
microsoft-dynamics-nav
standards
imessage
guzzle
dataflow-diagram
shared
jackson-modules
asymptotic-complexity
fractions
inversion-of-control
google-cast
mobx
android-sugarorm
reactjs.net
jwplayer6
xajax
zoomify
sessionstorage
apns-php
verifiable-c
metaprogramming
diacritics
escpos
smoothstate.js
drupal-theming
singleinstance
tinkerpop
yii2-user
edit
pdf-conversion
ampps
rocks
stripe-connect
ziparchive
envi
delta
libav
beanstalk
atan2
character-replacement
dock
eoferror
vacuum
snackbar
zend-currency
document-repository
theos
rmysql
xml-namespaces
vbe
twitter-bootstrap-rails
unit-of-work
tlf
superscrollorama
cardreader
alice
mapping-by-code
oracle-enterprise-linux
predicatebuilder
stress
cgimage
google-maps-mobile
convention
entity-attribute-value
jquery-tools
matlab-load
instantiationexception
easyb
web-garden
request-headers
sifr
spread
lxr
dojo-dnd
wysiwym
localizable.strings

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