FUNNYDUDe
FUNNYDUDe

Reputation: 1

My app crashes on ACTION VIEW in samsung devices But it Works on any other brand

The app works on other devices but not Samsung j200

error comes from this code :

  Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
  Uri.parse("geo:" + mission.Customer.Lat + "," + mission.Customer.Lng)); 
  startActivity(intent);

Any solutions

Upvotes: 0

Views: 81

Answers (1)

iDeveloper
iDeveloper

Reputation: 1725

When starting an activity with implicit use the code below to check if there is a package with an activity that matches the given criteria.

  if( intent.resolveActivity(packageManager)  != null )
      {
        startActivity(intent)
      }

Upvotes: 0

Related Questions