1

I have a problem with my Android app returning android.os.TransactionTooLargeException even when I clean all the data from my Fragment.

From the fragment that I implemented - see code below, I start a new activity, that activity starts but after a second the android.os.TransactionTooLargeException is thrown. I tried to clean all bundles, etc. so the fragment is as simple as possible, but it throws:

java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 608932 bytes.

Do you have any idea, where the problem can be, please?

public class ShowDetailFragment extends Fragment {

  public static boolean was207Called = false;

  public interface ExpandViewListener {
    void onExpandClicked();
  }

  public void setFullScreenListener(ExpandViewListener listener) {
  }

  public ShowDetailFragment() {
  }

  @Nullable
  @Override
  public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_show_detail, null, true);
    return v;
  }

  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
  }

  @Override
  public void onResume() {
    super.onResume();
  }

  @Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, null);
    Intent i = new Intent(getActivity().getApplicationContext(), ForgottenPasswordActivity.class);
    startActivity(i);
    return;
  }

  @Override
  public void onPause() {
    super.onPause();
  }

  @Override
  public void onSaveInstanceState(Bundle outState) {
  }

  public void onFragmentRemoved() {
    Log.d("XXXXX", "Frag removed");
  }

  @Override
  public void onStop() {
    super.onStop();
    Log.d("XXXX", "Stopping");
  }
}
Jaymin
  • 2,879
  • 3
  • 19
  • 35
Petr Kott
  • 111
  • 7

1 Answers1

0

Please Try :-

public class ShowDetailFragment extends Fragment {

  public static boolean was207Called = false;

  public interface ExpandViewListener {
    void onExpandClicked();
  }

  public void setFullScreenListener(ExpandViewListener listener) {
  }

  public ShowDetailFragment() {
  }

  @Nullable
  @Override
  public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_show_detail, container, false);
    return v;
  }

  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
  }

  @Override
  public void onResume() {
    super.onResume();

    Intent i = new Intent(getActivity(), 
    ForgottenPasswordActivity.class);
    startActivity(i);
  }

  public void onFragmentRemoved() {
    Log.d("XXXXX", "Frag removed");
  }

  @Override
  public void onStop() {
    super.onStop();
    Log.d("XXXX", "Stopping");
  }
}
Shalu T D
  • 3,921
  • 2
  • 26
  • 37