title: android getResources() from non-Activity class
body: <p>I'm trying to load my vertices array from assets/model.txt 
  I have OpenGLActivity, GLRenderer and Mymodel classes
  i added this line to the OpenGLActivity:</p>
  
  <pre><code>public static Context context;
  </code></pre>
  
  <p>And this to Mymodel class:</p>
  
  <pre><code>Context context = OpenGLActivity.context;
      AssetManager am = context.getResources().getAssets();
      InputStream is = null;
      try {
          is = am.open("model.txt");
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      Scanner s = new Scanner(is);
      long numfloats = s.nextLong();
      float[] vertices = new float[(int) numfloats];
      for (int ctr = 0; ctr &lt; vertices.length; ctr++) {
          vertices[ctr] = s.nextFloat();
      }
  </code></pre>
  
  <p>But it does'n work (</p>