MapActivity inside the TabGroup and handling onTap ovelay item
<p>I am trying to use MapActivity inside the TabGroup, problem is that while handling onTap(int) for Itemized Overlay I am getting null pointer exception. It was working perfectly without calling with parent(TabGroup.)</p>

<pre><code>protected boolean onTap(int index) {
    Intent i=new Intent(mContext,ViewProfileActivity.class);
    TabGroupActivity parent=(TabGroupActivity) activity.getParent();
    parent.startChildActivity("ViewProfileActivity", i);
}
</code></pre>

<p>earlier this one was working properly:</p>

<pre><code>protected boolean onTap(int index) {
    Intent i=new Intent(mContext,ViewProfileActivity.class);
    mContext.startActivity(i);
}
</code></pre>

<p>Logcat:</p>

<pre><code>&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791): FATAL EXCEPTION: main
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):
&gt; java.lang.NullPointerException 03-11 17:58:58.240:
&gt; E/AndroidRuntime(28791):  at
&gt; com.google.android.maps.GestureDetector.onTouchEvent(GestureDetector.java:548)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; com.google.android.maps.MapView.onTouchEvent(MapView.java:683) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.View.dispatchTouchEvent(View.java:4621) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1554)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1320) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1863)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1287)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.app.Activity.dispatchTouchEvent(Activity.java:2309) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1836)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1863)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1287)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.app.Activity.dispatchTouchEvent(Activity.java:2309) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1836)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1863)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1287)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.app.Activity.dispatchTouchEvent(Activity.java:2309) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1836)
&gt; 03-11 17:58:58.240: E/AndroidRuntime(28791):  at
&gt; android.view.View.dispatchPointerEvent(View.java:4689) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2365) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.view.ViewRoot.handleMessage(ViewRoot.java:2034) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.os.Handler.dispatchMessage(Handler.java:99) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; android.os.Looper.loop(Looper.java:132) 03-11 17:58:58.240:
&gt; E/AndroidRuntime(28791):  at
&gt; android.app.ActivityThread.main(ActivityThread.java:4028) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; java.lang.reflect.Method.invokeNative(Native Method) 03-11
&gt; 17:58:58.240: E/AndroidRuntime(28791):    at
&gt; java.lang.reflect.Method.invoke(Method.java:491) 03-11 17:58:58.240:
&gt; E/AndroidRuntime(28791):  at
&gt; com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zyg
</code></pre>

<p>Thanks,</p>
