File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Android and the fly likes startActivity error for Android graph view Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "startActivity error for Android graph view" Watch "startActivity error for Android graph view" New topic

startActivity error for Android graph view

bd tuhin

Joined: Jan 16, 2012
Posts: 1
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:

case 2:
TimeSeries series2 = new TimeSeries("WiFi 1");
TimeSeries series3 = new TimeSeries("WiFi 2");
for( int i2 = 0; i2 < DataCnt; i2++)
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++)
int WifiRSSIVal = (Integer.parseInt(String.valueOf(SortedData[i3][1])));
int WifiTimeVal = (Integer.parseInt(String.valueOf(SortedData[i3][2])));
series3.add(WifiRSSIVal, WifiTimeVal);
XYSeriesRenderer renderer2 = new XYSeriesRenderer();

XYSeriesRenderer renderer3 = new XYSeriesRenderer();
case 3:

case 10:

Intent intent = ChartFactory.getLineChartIntent(context, dataset, mRenderer, "Graph 1");
this.startActivity(intent); //I have tried here by this (startActivity(intent))
Darryl Burke

Joined: May 03, 2008
Posts: 5098

bd tuhin, please BeForthrightWhenCrossPostingToOtherSites

Any more?

luck, db
There are no new questions, but there may be new answers.
Darryl Burke

Joined: May 03, 2008
Posts: 5098

Moved from 'Java in General'
Monu Tripathi

Joined: Oct 12, 2008
Posts: 1369

What is the exception that you are getting?

[List of FAQs] | [Android FAQ] | [Samuh Varta]
Tim Moores

Joined: Sep 21, 2011
Posts: 2409
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.
I agree. Here's the link:
subject: startActivity error for Android graph view
It's not a secret anymore!