I saw several approaches and I tried everything but couldnt make it work.I dont know why it is so complicated, in the docs it looks so easy! I want to trigger the OnNewInten
After long inspection i noticed that Android 4.4 (Kitkat and maybe lower) won't call onNewIntent and onResume neither if you use FLAG_UPDATE_CURRENT on pendingIntent. Once you change it to FLAG_ONE_SHOT it will start working. on Android 6 (and probably also 5) however onNewIntent works even with FLAG_UPDATE_CURRENT flag.
However, it seems that if you create multiple pending intents (eg after receiving two notifications) the data will not be updated with flag FLAG_ONE_SHOT, so flag FLAG_CANCEL_CURRENT may be a better choice (it has no issue with not updated data)