Code example for Intent

Methods: addFlagsputExtra

0
  @Override 
  protected void onListItemClick(ListView l, View view, int position, long id) {
    ListAdapter adapter = getListAdapter();    
    if (position >= 0 && position < adapter.getCount()) {
      String packageName = ((AppInfo) adapter.getItem(position)).getPackageName();
      Intent intent = new Intent();
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
      intent.putExtra(Browser.BookmarkColumns.URL, "market://details?id=" + packageName);
      setResult(RESULT_OK, intent);
    } else { 
      setResult(RESULT_CANCELED);      
    } 
    finish();
  } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE