I'm developing push notification base android app. I need to open (launch) android app when the application received a push notification. please explain.
i tried following code
      <activity                                                                                                                                                                                                           
      android:name="com.yamuko.driver.PickupRequestCustomDialogActivity"
      android:launchMode="singleTask"
      android:theme="@style/NoTitleDialog" />
in onMessageReceived() used below code.
            Intent home = new Intent();
            Bundle extras = new Bundle();
            home.putExtras(extras);
            home.setAction(Intent.ACTION_MAIN);
            home.addCategory(Intent.CATEGORY_LAUNCHER);
            home.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NO_ANIMATION | Intent.FLAG_ACTIVITY_SINGLE_TOP);
            ComponentName cn = new ComponentName(getApplicationContext(), PickupRequestCustomDialogActivity.class);
            home.setComponent(cn);
            getApplication().startActivity(home);