title: Google maps not working on tablets
body: <p>I have the following code to open google map to get direction between two location. The code runs fine in all the phones that I have tested but it does not run in an of the tablets.</p>
  
  <p>Below is my code: This is called when I click on a button (It crashes in tablets when I click on this button but runs fine on mobile phone)</p>
  
  <pre><code> Toast.makeText(getApplicationContext(), "Opening Google Map", 1).show();
   SharedPreferences carLocation = getSharedPreferences("CarLocation", Context.MODE_PRIVATE);
  
   if(carLocation.contains("carlatitude")){
      //do nothing
   } else {
      showCurrentStatus = true;
   }
  
   AsyncTask&lt;Void, Void, Void&gt; dostuff = new AsyncTask&lt;Void, Void, Void&gt;(){
  
   @Override
   protected Void doInBackground(Void... params) {
     try{
        if(mLocationClient.isConnected()){
          mLocationClient.disconnect();
        }
        mLocationClient.connect();
     }catch(Exception e){
        e.printStackTrace();
     }
    return null;
   }
  
   protected void onPostExecute(Void result) {
      if(mLocationClient.isConnected()){
          mLocationClient.disconnect();
      }
  };
  
  };dostuff.execute(); 
  </code></pre>
  
  <p>And my onConnect is as follow:</p>
  
  <pre><code> @Override
  public void onConnected(Bundle arg0) {
      Log.d("MAinActivit","fetching current location");
      Location location = mLocationClient.getLastLocation();
      double curLat = location.getLatitude();
      double curLong = location.getLongitude();
  
      SharedPreferences carLocation = getSharedPreferences("CarLocation", Context.MODE_PRIVATE);
      double carLat = Double.parseDouble(carLocation.getString("carlatitude", ""+curLat));
      double carLong = Double.parseDouble(carLocation.getString("carlongitude", ""+curLong));
  
      if(showCurrentStatus){
          Toast.makeText(getApplicationContext(), "Your current location", 0).show();
          showCurrentStatus = false;
  
          Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
          Uri.parse("http://maps.google.com/maps?saddr="+curLat+","+curLong));
          intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
          startActivity(intent);
      }else{
          Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
          Uri.parse("http://maps.google.com/maps?saddr="+curLat+","+curLong+"&amp;daddr="+carLat+","+carLong));
          intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
          startActivity(intent);
      }
  }
  </code></pre>