I got this new crash exception after the newest app update. It seems to not point anywhere. Would anyone be able to tell what the issue is? It looks like a possible email-forma
By the way no email client can occur if no email account is set up on the device so technically this can occur on real devices as well. Here is the code for disabling the AutoLink if not available as suggested by novettam:
protected boolean checkIntent(Intent intent)
{
PackageManager packageManager = getPackageManager();
List apps = packageManager.queryIntentActivities(intent, 0);
return apps.size() > 0 && !( apps.get(0).activityInfo.name.equals(activity.getClass().getName()) && apps.size() == 1) ;
}
protected Intent createDummyEmailIntent()
{
final Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"mailto", "abc@gmail.com", null));
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "EXTRA_SUBJECT");
return emailIntent;
}
protected Intent createDummyWebIntent()
{
final Intent webIntent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse("http://www.google.co.uk"));
return webIntent;
}
protected Intent createDummyPhoneIntent(){
String uri = "tel:" + "0131 666 7777".trim() ;
final Intent phoneIntent = new Intent(Intent.ACTION_DIAL);
phoneIntent.setData(Uri.parse(uri));
return phoneIntent;
}
//Checking
if ( !checkIntent(intent) ) {
textview.setAutoLinkMask(0);
}
//be sure that you call setText after this