Question: start Activity from inside a Fragment 
can be done with both codes :

```
startActivity(Intent);

getActivity().startActivity();

```

what is the difference ??

**Note** :
I know the difference when it becomes to `startActivityForResult();` 
so please don't post any thing relates to this method.

Thanks

Answer: 
Nothing. [The `Fragment` docs](http://developer.android.com/reference/android/app/Fragment.html#startActivity%28android.content.Intent%29) are pretty clear on this:

> 
> `public void startActivity (Intent intent)`
> 
> 
> Call `startActivity(Intent)` from the fragment's containing Activity.
> 
> 
>
The biggest difference:

Fragment#startActivity() check if mHost == null throw "Fragment this is not attached to Activity" exception. If you use `getActivity().startActivity()` it will return a nullable value. If mHost is null you will get NullPointException i.