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

“shortcut app name created” show only 1 time
Cast receives a APPLICATION_NOT_FOUND status when trying to launch an application
How do I set internet permissions for a “command line” C program in Android?
dynamically resized Thumb of SeekBar gets clipped above and below, how to draw on top (Z order)?
Android: override pending Transition for Activity Theme Dialog not working
How to get text from Search Suggestion onClick
In-app billing v3 works wrong
Access Viewflipper in other class
XML layout not working as defined
Android - Convert URL to File
Better place to save images in device
Bitmap show out of screen
How to Radiogroup for a radio button in a Relative android layout
I'm using SQLCIPHER to read or write database getting error
custom adapter do not refresh the listview for onclicklistener in android
FragmentBreadCrumbs style - text color?

Categories

HOME
uml
wakanda
camera
can
nuget
vxml
python-multithreading
little-proxy
drop-down-menu
plist
windows-ce
angular-dart
android-intent
qsqlquery
altera
modbus-tcp
aws-sdk
xmonad
mapstruct
sigma.js
sar
articulate-storyline
blade
delimiter
outliers
soot
powershell-ise
weather
cart
html-encode
reverse
video-capture
watchman
phpdbg
flask-restful
dotnet-httpclient
chai-as-promised
geotiff
amq
truezip
pdf-conversion
ampps
branch-prediction
pocketsphinx-android
winusb
i386
expectations
halcon
boomerang
dynatree
rate-limiting
sapscript
ocra
linked-tables
zxspectrum
java-security
beatsmusic
punycode
android-audiorecord
composite-component
cascadingdropdown
patricia-trie
subgraph
listitem
oracle-enterprise-linux
koken
role
u2netdk
event-receiver
dataform
ie-compatibility-mode
hbm2java
skype4java
purepdf
windows-identity
application-planning
linfu-dynamicproxy
contentpresenter
mathematical-typesetting

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