Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: startActivity error in for Android graph view

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default startActivity error in for Android graph view

    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))
    <<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: startActivity error in for Android graph view

    This thread has been cross posted here:

    http://www.java-forums.org/android-examples/54070-startactivity-error-android-graph-view.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


  3. #3
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: startActivity error in for Android graph view

    startActivity error for Android graph view (Android forum at JavaRanch)

Similar Threads

  1. xml view for android program
    By ikkyu in forum Java IDEs
    Replies: 0
    Last Post: November 28th, 2011, 10:27 PM
  2. error when switch activity in android
    By yefta in forum Android Development
    Replies: 3
    Last Post: October 26th, 2011, 10:50 AM
  3. Replies: 2
    Last Post: August 27th, 2011, 07:22 AM
  4. Unable to view date
    By Rajiv in forum Web Frameworks
    Replies: 1
    Last Post: August 17th, 2011, 09:03 AM
  5. Java Bar graph takes user input to create graph?
    By kenjiro310 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 31st, 2011, 07:37 AM