0
public class Details implements Parcelable {

@Ignore
protected Details(Parcel in) {
    id = in.readLong();
    timestamp = in.readString();
    type = in.readInt();
}


@Ignore
public static final Creator<Details> CREATOR = new Creator<Details>() {
    @Override
    public Details createFromParcel(Parcel source) {
        return new Details(source);
    }

    @Override
    public Details[] newArray(int size) {
        return new Details[size];
    }
};

}

Using bundle to move data to fragment.

DetailsManagementIncomeFragment fragment = new DetailsManagementIncomeFragment();
Bundle args = new Bundle();
args.putParcelable("details", details);
fragment.setArguments(args);

in createView, it blacks out in release mode only, actually it hangs.

Details details = getArguments().getParcelable("details");

Not able to debug it in android studio as it works fine there.

David Wasser
  • 93,459
  • 16
  • 209
  • 274
Umer Khalid
  • 330
  • 2
  • 16

1 Answers1

1

Crash in release and not is debug points to code obfuscation done by ProGaurd. Refer https://medium.com/programming-lite/secure-your-codes-by-enabling-proguard-in-android-app-bbbc003144b5 for more details. I recommend keeping your model class in Keep.xml so that it won't get obfuscated.

Try this
  • 511
  • 3
  • 8