In my app, i have a widget. If user clicks on widget, I am opening SplashScreen using pending intent using below code.
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
views.setOnClickPendingIntent(R.id.widget_main_layout, pendingIntent);
This code works fine is app is not open and launch my splash screen.
However if app is already open and in background and if i click on widget then my SplashScreen not opening and instead only app comes to the froeground.
Could anyone let me know whats wrong with my code?