In my application I need to open an explicit activity of another app from my app using intent and show the data send by my intent , data is a url most of the time. For example if my app shows some news from times of India app or some other news app , How can I open that particular news app redirected with news clicked by user.
I am using below code for Dailymotion app :
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(newsFeedsList.get(getPosition()).getStrNewsLink()));
intent.setClassName(packageName, "com.dailymotion.dailymotion.mobile.activity.InterstitialActivity");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
context.startActivity(intent);
It is working fine , but what if I dont have the name of class name for particular activity ? Please suggest!!