In my application I am using SherlockFragment for Sidenavigation menu and as well as Tab fragments.
Here I got a position to use OnNewIntent function inside SherlockFragment. But its returning an error like "The method onNewIntent(Intent) of type classname must override or implement a supertype method".
code:
public class MyClass extends SherlockFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Get the view from Twitter.xml
View view = inflater.inflate(R.layout.activity, container, false);
return view;
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
}
}
So can any one suggest me how to solve this?
If you want to access onNewIntent inside fragment it is impossible onNewIntent is a part of activity so you need to place this method with override in you activity and access the intent via
You need to put onNewIntent inside a Activity
Now every call for getIntent() on this activity will give you the latest intent