I am trying to open a link in the browser on click of an imageview inside a recycler view in android. I have logged all the links that are coming and they all have https:// at the start. I get exception:
android.content.ActivityNotFoundException: No Activity found to handle Intent
I have tried reading the related questions but none helped. My onClick() code is:
 public void onClick(View v) {
            String url = mTitleList.get(getAdapterPosition());
            Intent intent  = new Intent();
            intent.setAction(Intent.ACTION_VIEW);
          // intent.addCategory(Intent.CATEGORY_BROWSABLE);
            //pass the url to intent data
            intent.setData(Uri.parse(url));
            startActivity(intent);
        }
 
     
     
     
     
    