@Override
 public void onResume() {
   super.onResume();
   emojisAppReceiver = new EmojisAppReceiver(this);
   mFilter = new IntentFilter();
   mFilter.addAction(Constants.IntentActions.ACTION_ERROR);
   mFilter.addAction(Constants.IntentActions.ACTION_SUCCESS);
   getActivity().registerReceiver(emojisAppReceiver, mFilter);
 }
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   /* try {
     //  mListener = (OnFragmentInteractionListener) activity;
   } catch (ClassCastException e) {
       throw new ClassCastException(activity.toString()
               + " must implement OnFragmentInteractionListener");
   }*/
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (getArguments() != null) {
      mParam1 = getArguments().getInt(ARG_PARAM1);
      // mParam2 = getArguments().getString(ARG_PARAM2);
    }
    setRetainInstance(true);
    this.emojiDataList = new ArrayList<EmojiData>();
    mProgressDialog = new ProgressDialog(getActivity());
    // mProgressDialog.setTitle("Loading");
    mProgressDialog.setMessage("One moment please...");
    mProgressDialog.setCancelable(false);
    mProgressDialog.show();

    ApiIntentService.getEmojisData(getActivity());
    // populateList();
  }
 @Override
 public void onDetach() {
   super.onDetach();
   // mListener = null;
 }
 @Override
 public void onPause() {
   super.onPause();
   getActivity().unregisterReceiver(emojisAppReceiver);
 }