mirror of
https://github.com/akaessens/NoFbEventScraper
synced 2025-06-05 23:29:13 +02:00
prevent activityNotFound crash on calendar intent
This commit is contained in:
@ -174,7 +174,10 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
// prepend url in description
|
// prepend url in description
|
||||||
String desc = event.url + "\n\n" + event.description;
|
String desc = event.url + "\n\n" + event.description;
|
||||||
intent.putExtra(CalendarContract.Events.DESCRIPTION, desc);
|
intent.putExtra(CalendarContract.Events.DESCRIPTION, desc);
|
||||||
startActivity(intent);
|
|
||||||
|
if (intent.resolveActivity(getPackageManager()) != null) {
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user