Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6541825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:09:07+00:00 2026-05-25T11:09:07+00:00

I am creating an application that saves GPS coordinates; I have created a button

  • 0

I am creating an application that saves GPS coordinates; I have created a button which launches a new Activity to display, as a list all the save coordinates. The program crashes a soon as I hit the button, here is what I am doing.

class 1:

        public void openLatLonData(View view)
    {
        Intent intent = new Intent(this, GpsDataList.class);
        ArrayList<String> allLocalStrings = new ArrayList<String>();
        for(int i =0; i< AllLocals.size();i++)
        {
            allLocalStrings.add(AllLocals.get(i).getLat());
            allLocalStrings.add(AllLocals.get(i).getLon());
        }
        intent.putStringArrayListExtra("data", allLocalStrings);
        startActivity(intent);
    }

This method calls the new activity:

public class GpsDataList extends ListActivity

{

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle bundleIn) 
{
    super.onCreate(bundleIn);
    Intent intent = getIntent();
    ArrayList<String> listData = new ArrayList<String>();

    listData = intent.getStringArrayListExtra("data");

    this.setListAdapter(new ArrayAdapter<String>(this,
            android.R.layout.simple_list_item_1, listData));
  getListView().setTextFilterEnabled(true);

  //finish();

}

}

the button contains the following XML:

    <Button android:layout_height="wrap_content" 
android:text="Show Collected Data" 
android:id="@+id/view_lat_lon_data" 
android:layout_width="wrap_content"
android:onClick="openLatLonData">
</Button>

And I have added a new .xml file named gpsdatalist.xml under the res/layout folder:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

</LinearLayout>

Lastly the manifest contains this: .

I believe I have all the pieces in play- Hopefully someones see the mistake
Thanks in advance guys!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:09:08+00:00Added an answer on May 25, 2026 at 11:09 am

    Did you define the activity in the AndroidManifest.xml file?
    Anyway, your best clue resides in the logcat of your exception. You will solve it in 2 seconds after cheking the logcat.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an application that will have a list of items that can
We are creating an XBAP application that we need to have rounded corners in
I am new to WIX and have been tasked with creating an installer that
I am creating a web application that acts as a priority list, allowing a
I'm creating an application such that the user is in an Activity, and opens
We have an application that Generates a hash code on a string Saves that
I am creating an application in which I have add a facility for post
I'm creating an application that will store a hierarchical collection of items in an
I am creating an application that manages multiple instances of an external utility, supplying
I am creating an application that uses popups. However, I would like to animate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.