Simple:
Uri uri=Uri.parse("geo:"+_lat+","+_lon);
startActivity(new Intent(Intent.ACTION_VIEW, uri));
startActivity() crashes my app (I know why). So, I want to get info why this activity doesn’t want to start and (maybe) show some info via toast, via showToast(msg).
PS: I am beginner. 🙂
If it crashes then there is an exception. Surround your
startActivity()call withtrycatchand catch the exception. The exception will give you all info you need. You can also showtoastfrom the catch block.