Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

startActivity error for Android graph view

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I have a code but it doesn't work ! can you please help me on it? it will show graph in android field. but startActivity doesn't properly !! can anyone help me please ?

<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

int DataCnt = 6;
SortedData[][] //This is an 2D array
---------------
[[FASTWEB-2012, -66, 0], [FASTWEB-1-001CA2B8E818, -85, 0], [FASTWEB-2012, -66, 5], [FASTWEB-1-001CA2B8E818, -85, 5], [FASTWEB-2012, -66, 10], [FASTWEB-1-001CA2B8E818, -85, 10]]
TerminalCount[][] ////This is an 2D array
-------------------
[[FASTWEB-2012, 3], [FASTWEB-1-001CA2B8E818, 3]]


XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer();

switch (TermDimenSnRow) //suppose I have TermDimenSnRow = 2
{
case 1:
break;

case 2:
TimeSeries series2 = new TimeSeries("WiFi 1");
TimeSeries series3 = new TimeSeries("WiFi 2");
for( int i2 = 0; i2 < DataCnt; i2++)
{
if(TerminalCount[0][0].equals(SortedData[i2][0]))
{
int WifiRSSIVal = (Integer.parseInt(String.valueOf(SortedData[i2][1])));
int WifiTimeVal = (Integer.parseInt(String.valueOf(SortedData[i2][2])));
series2.add(WifiRSSIVal, WifiTimeVal);
}
}
for( int i3 = 0; i3 < DataCnt; i3++)
{
if(TerminalCount[1][0].equals(SortedData[i3][0]))
{
int WifiRSSIVal = (Integer.parseInt(String.valueOf(SortedData[i3][1])));
int WifiTimeVal = (Integer.parseInt(String.valueOf(SortedData[i3][2])));
series3.add(WifiRSSIVal, WifiTimeVal);
}
}
dataset.addSeries(series2);
XYSeriesRenderer renderer2 = new XYSeriesRenderer();
mRenderer.addSeriesRenderer(renderer2);

dataset.addSeries(series3);
XYSeriesRenderer renderer3 = new XYSeriesRenderer();
mRenderer.addSeriesRenderer(renderer3);
break;
case 3:
break;
-
-
-
-
-


case 10:
break;

Intent intent = ChartFactory.getLineChartIntent(context, dataset, mRenderer, "Graph 1");
this.startActivity(intent); //I have tried here by this (startActivity(intent))
<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bd tuhin, please BeForthrightWhenCrossPostingToOtherSites
http://www.javaprogrammingforums.com/whats-wrong-my-code/13472-startactivity-error-android-graph-view.html
http://www.java-forums.org/android-examples/54070-startactivity-error-android-graph-view.html

Any more?
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved from 'Java in General'
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the exception that you are getting?
 
Saloon Keeper
Posts: 7350
170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While you didn't tell us what the problem is (no, "startActivity doesn't properly" does not tell us anything), looking at the class names it seems that you are trying to use the JFree library; is that correct? If so, it's not going to work, because JFree uses lots of AWT classes that don't exist on Android.
 
reply
    Bookmark Topic Watch Topic
  • New Topic