title: android - how to make plot with user data
body: <p>I have a program which makes some calculations according to user data.
  The program works fine ,but when i try to use achartengine in order to make the plot ,it crashes.(doesn't do the plot)</p>
  <p>I am not sure if i am passing right the data in the LineGraph class.</p>
  <p>As i understand i must use</p>
  <blockquote>
  <p>&quot;Bundle sth=getIntent.getExtras()&quot;
  but i am not sure where to put it in LineGraph.</p>
  </blockquote>
  <p>I have the number_cores class which in which the user enters the data and then presses the calculate button and in another activity shows the result.
  In this , i have :</p>
  <pre><code>public void cores_func(){
               double initcores=Double.parseDouble(num_cores.getText().toString().trim());
               double half_time=Double.parseDouble(halftimecores.getText().toString().trim());
               double ttime=Double.parseDouble(timecores.getText().toString().trim());
               double l=Math.log(2)/half_time;
               double fcores=initcores*Math.exp(-l*ttime);
               
               
               Intent i=new Intent(this,core_calcs.class);
               i.putExtra(&quot;value&quot;,fcores);
               i.putExtra(&quot;value2&quot;,initcores);
               startActivity(i);  
           }
  </code></pre>
  <p>Then , in the core_calcs class (as you can see from the intent above) , i show the result and also i added a button which when the user clicks it ,shows the graph (right now ,it crashes here).</p>
  <p>I have (core_calcs) in the onCreate method :</p>
  <pre><code>double fcores=getIntent().getExtras().getDouble(&quot;value&quot;);
          double initcores=getIntent().getExtras().getDouble(&quot;value2&quot;);
  </code></pre>
  <p>and then :</p>
  <pre><code> public void onClick(View v) {
      switch (v.getId()){
      case R.id.show_cores_graph:
          double fcores=getIntent().getExtras().getDouble(&quot;value&quot;);
          double initcores=getIntent().getExtras().getDouble(&quot;value2&quot;);
          Intent i = new Intent();        
          i.setClassName(&quot;com.wordpress.androiddevgeo.Radiation&quot;,LineGraph.class.getName());                 
          i.putExtra(&quot;value&quot;, fcores);
          i.putExtra(&quot;value2&quot;, initcores);
          this.startActivity(i);  
          break;
        }      
      }
  </code></pre>
  <p>(also, i have the public void LineGraphHandler (View view) here)</p>
  <p>Finally , in the LineGraph class (the intent above):</p>
  <pre><code>public class LineGraph extends Activity {
  
  public void onCreate(Bundle savedInstanceState){
      
      super.onCreate(savedInstanceState);
      
      Bundle extras=getIntent().getExtras();
      String fcores=extras.getString(&quot;value&quot;);
      String initcores=extras.getString(&quot;value2&quot;);
  }
  
  
  
  public Intent getIntent(Context context){
      
      //double ttime=getIntent(context).getExtras().getDouble(&quot;value&quot;);
                      
      double [] x = {0,100};           //time axis
      double [] y = {initcores,fcores};  //number of cores axis
      
      TimeSeries series = new TimeSeries(&quot;Number of cores&quot;);
      for (int i=0;i&lt;x.length;i++){
          series.add(x[i],y[i]);
      }
      
      XYMultipleSeriesDataset dataset=new XYMultipleSeriesDataset();
      dataset.addSeries(series);
      
      XYMultipleSeriesRenderer mRenderer =new XYMultipleSeriesRenderer();
      XYSeriesRenderer renderer =new XYSeriesRenderer();
      mRenderer.addSeriesRenderer(renderer);
      
      Intent intent=ChartFactory.getLineChartIntent(context, dataset, mRenderer,&quot;Decay&quot;);
      
      return intent;
      
        }
         }
  </code></pre>
  <p>How to pass the data (initcores and fcores ) to the LineGraph?</p>
  <p>--------Error messages ---------------------------------------------</p>
  <blockquote>
  <p>W/dalvikvm(734): threadid=3: thread exiting with uncaught exception</p>
  <p>(group=0x4000fe70) 01-15 18:42:01.334: E/AndroidRuntime(734): Uncaught
  handler: thread main exiting due to uncaught exception</p>
  <p>E/AndroidRuntime(734): android.content.ActivityNotFoundException: Unable to find explicit activity class</p>
  <p>have you declared this activity in your AndroidManifest.xml?</p>
  </blockquote>
  <p>(I have declared the activity for the LineGraph and also &quot;org.achartengine.GraphicalActivity&quot;)
  Thanks!</p>