Code example for Activity

Methods: startActivitymakeText

0
													public void onClick(DialogInterface dialog, int which) {
														//edit the preference 
														String url = issue.getLink();  
														try { 
														    Intent i = new Intent(Intent.ACTION_VIEW);  
														    i.setData(Uri.parse(url));  
														    context.startActivity(i);
														} catch (ActivityNotFoundException ex) {
															Toast.makeText(context, ex.getMessage() + " for " + url, Toast.LENGTH_LONG).show();
														} 
													} 
												}); 
												builder.setNegativeButton(cancelButton, null);
												builder.show();
 
												return false; 
											} 
										}); 
								cat.addPreference(preference);
							} 
Connect your IDE to all the code out there  Get Codota for Java