title: Google Maps offline Mode on Android Application
body: <p>Is there any posibility to show Google Maps if you are offline in your own App?</p>
  
  <p>What about if I download an Area <strong>FROM Google Maps application</strong> for offline mode, could i visualize the map on the app that i develop if i don't have internet connection?
  if not, What options do i have to make this possible? I just want to visualize the map when my app is offline...  </p>
  
  <p>The following its the code that this post provided <a href="https://stackoverflow.com/questions/14784841/tileprovider-using-local-tiles">TileProvider using local tiles</a></p>
  
  <pre><code>@Override
  public Tile getTile(int x, int y, int zoom) {
          byte[] image = readTileImage(x, y, zoom);
          return image == null ? null : new Tile(TILE_WIDTH, TILE_HEIGHT,image);
  }
  private byte[] readTileImage(int x,int y, int zoom){
      InputStream is= null;
      ByteArrayOutputStream buffer= null;
  
      try{
          is= mAssets.open(getTileFileName(x,y,zoom));
          buffer= new ByteArrayOutputStream();
  
          int nRead;
          byte[] data= new byte[BUFFER_SIZE];
  
          while ((nRead= is.read(data,0,BUFFER_SIZE)) !=-1){
              buffer.write(data,0,nRead);
          }
          buffer.flush();
  
          return buffer.toByteArray();
      }
      catch(IOException ex){
          Log.e("LINE 60 CustomMap", ex.getMessage());
          return null;
      }catch(OutOfMemoryError e){
          Log.e("LINE 64 CustomMap", e.getMessage());
          return null;
      }finally{
          if(is!=null){
              try{
                  is.close();
              } catch (IOException e) {}
          }
          if(buffer !=null){
              try{
                  buffer.close();
              }catch (Exception e){}
          }
      }
  }
  
  private String getTileFileName(int x, int y, int zoom){
      return "map/"+ zoom +'/' +x+ '/'+y+".png";
  }
  </code></pre>
  
  <p>I was looking for information, and My questions is, how can i download the tiles?</p>