public static void openImdbForMovie(Context context,String imdbNumber){
  if (context == null || TextUtils.isEmpty(imdbNumber)) {
    return;
  }
  Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(String.format(IMDB_APP_MOVIE_URI,imdbNumber)));
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
  if (!Utils.tryStartActivity(context,intent)) {
    intent=new Intent(Intent.ACTION_VIEW,Uri.parse(String.format(IMDB_MOVIE_URL,imdbNumber)));
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
    context.startActivity(intent);
  }
}

public static void openImdbForMovie ( Context context , String imdbNumber ) { if ( context == null || TextUtils . isEmpty ( imdbNumber ) ) { return ; } Intent intent = new Intent ( Intent . ACTION_VIEW , Uri . parse ( String . format ( IMDB_APP_MOVIE_URI , imdbNumber ) ) ) ; intent . addFlags ( Intent . FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET ) ; if ( ! Utils . tryStartActivity ( context , intent ) ) { intent = new Intent ( Intent . ACTION_VIEW , Uri . parse ( String . format ( IMDB_MOVIE_URL , imdbNumber ) ) ) ; intent . addFlags ( Intent . FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET ) ; context . startActivity ( intent ) ; } }
open the imdb app or web page for the given person name .
