package com.marvinlabs.intents.demo;

import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;



public class MainActivity extends ActionBarActivity implements IntentItemFragment.OnFragmentInteractionListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.container, new IntentItemFragment())
                    .commit();
        }
    }

    @Override
    public void onFragmentInteraction(Intent intent) {
        startActivity(intent);
    }
}

@@ -954,24 +954,94 @@
 t intent) %7B%0A
+        if(intent.resolveActivity(getPackageManager()) != null) %7B%0A    
         star
@@ -1059,16 +1059,26 @@
 ntent);%0A
+        %7D%0A
     %7D%0A%7D%0A

Update MainActivity.java