// Application ...
Intent i = new Intent();
i.putExtra(EXTRA_FILE_UPLOAD_URIS, mGalleryAdapter.getItems());
Uri[] getItems() { return mItems; }
// Service ...
int
https://stackoverflow.com/a/8745966/72437 and https://stackoverflow.com/a/20073367/72437 have well explanation on why such crash happens.
https://stackoverflow.com/a/14866690/72437 also has a example on how we can workaround with this.
I would like to provide code examples, to help better understanding.
Let me demonstrate an example on why such incident fails sometimes.
package javaapplication12;
/**
*
* @author yccheok
*/
public class JavaApplication12 {
public static class Parcelable {
}
public static class Uri extends Parcelable {
}
public static Parcelable[] getParcelableArrayExtraDuringLowMemoryRestoration() {
// The Android system has no way to know it needs to create Uri[],
// during low memory restoration process.
Parcelable[] parcelables = new Parcelable[3];
for (int i=0; i
package javaapplication12;
/**
*
* @author yccheok
*/
public class JavaApplication12 {
public static class Parcelable {
}
public static class Uri extends Parcelable {
}
public static Parcelable[] getParcelableArrayExtraDuringLowMemoryRestoration() {
// The Android system has no way to know it needs to create Uri[],
// during low memory restoration process.
Parcelable[] parcelables = new Parcelable[3];
for (int i=0; i