-1

I have a problem with my app: in main activity I have fragments, and one of them is ChannelFragment. It includes RecyclerView with items in it.

When I click on RecyclerView's item, I want to start new Activity, but it works only with few items. When I click on the rest items, my activity goes to background after startActivityForResult(), but it doesn't call DetailActivity onCreate() method.

Here is my code:

if (!mListMode &&
        (info.isNeedBuy() || info.isNeedDownload() || info.isNeedUpdate())) {
        Intent intent = new Intent(mActivity.getApplicationContext(),
            DetailActivity.class);
        intent.putExtra("ItemInfo", info);
        intent.putExtra("id", mId);
        intent.putExtra("deviceType", mDeviceType);
        startActivityForResult(intent, 1);}

@Override
public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode == Activity.RESULT_OK) {
        Iteminfo = data.getParcelableExtra("packageItemInfo");
        download(info);
    }
}
Slonorib
  • 79
  • 2
  • 11

1 Answers1

1

Finally, I solved it. The problem was with an object "info" that I put in intent. It had 2 drawables and broke 1 mb data limit (Maximum length of Intent putExtra method? (Force close)). So I just deleted object's drawables and got them from cache in calling activity.

It's strange that debug didn't say anything about the limit.

Community
  • 1
  • 1
Slonorib
  • 79
  • 2
  • 11