title: How to use the .p files created from Libgdx particle editor in my Android game
body: <p>I have created a .p file using Libgdx particle editor by downloading libgdx-nightly-latest.zip  using this  <a href="https://www.youtube.com/watch?v=LCLa-rgR_MA" rel="nofollow">https://www.youtube.com/watch?v=LCLa-rgR_MA</a>  tutorial.    Now in my Android project i have added gdx.jar and gdx-backend-android.jar as external jar from Libgdx.  I found the following code which are used in libgdx project:</p>
  
  <pre><code>        ParticleEffect effect = new ParticleEffect();
          FileHandle fileDir = Gdx.files.internal("data");
          effect.load(Gdx.files.internal("data/myParticleTxtFile"), fileDir);
          effect.start();
  
          effect.draw(batch, Gdx.graphics.getDeltaTime());
          batch.end();
  </code></pre>
  
  <p>I modified the above code as follows in onDraw() method</p>
  
  <pre><code>        ParticleEffect effect = new ParticleEffect();
          FileHandle fileDir = Gdx.files.internal("asset");
          effect.load(Gdx.files.internal("asset/myParticleTxtFile.p"), fileDir);
          effect.start();
  
          effect.draw((Batch) canvas, Gdx.graphics.getDeltaTime());
          ((Batch) canvas).end();
  </code></pre>
  
  <p>After debugging the code it is giving null pointer exception Gdx.files.internal("asset") here.I can understand that it is not getting any asset folder but how solve this and how draw particle effect in onDraw() using that .p file in android??</p>