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

  • SEARCH
  • Home
  • 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 6859059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:14:12+00:00 2026-05-27T02:14:12+00:00

First screen user is ask to select different buttons that are categories then after

  • 0

First screen user is ask to select different buttons that are categories then after the categories are selected display the locations in a map.

For example user selects to search for restaurants and bars then click search. Then the next screen will show icons with the locations in the map.

Im confused on how to pass the data from my mainActivity to the MapActivity.

I try to do a loop for each button: but it displays all the buttons I only want to display the selected ones.

—————-Activityone—————-

if (toggleButton5.isChecked()) {

double point3=37326489;
double point4=-121772461;

 Bundle b = new Bundle(); // create a bundle to pass to map activity
      b.putDouble("point3",point3); // bundle the geo points for the map activity and convert to 1e6
      b.putDouble("point4",point4);
      Intent myIntent = new Intent(view.getContext(), Map.class); // create the intent to launch the map
      myIntent.putExtras(b); // attach bundle to map activity
   startActivityForResult(myIntent, 0); // start map activity
   //map things!
}

—————-MapAcivity—————-

  Bundle b = this.getIntent().getExtras();
  Drawable drawable1 = this.getResources().getDrawable(R.drawable.button_food_on);
OverlayMap itemizedoverlay2 = new OverlayMap(drawable1, this);

GeoPoint point2 = new GeoPoint((int)(b.getDouble("point3")),(int)   (b.getDouble("point4")));

OverlayItem overlayitem1 = new OverlayItem(point2, "", "");

  itemizedoverlay2.addOverlay(overlayitem1); 
     mapOverlays.add(itemizedoverlay2);

Edit:
first here is an image of the first screen:

  • 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-27T02:14:13+00:00Added an answer on May 27, 2026 at 2:14 am

    You’re trying to do a lot of things here. Parsing xml in android is not trivial. Filtering a list of displayable icons in android is not trivial. When asked individually, answers to these problems are easy to find on this website.

    I’ll help you with one of the trivial problems to get you started on your way, though.

    The reason you’re not getting the variables that you want to filter to your MapActivity is because you aren’t sending them.

    Before you start your intent (and after you declare it) put the variables you want to filter in an Extra, possibly as an array of strings.

    String[] searchFilter = {"restaurants", "bars"}; //build this array of variables from your buttons, this is just a static example
    Intent myIntent3 = new Intent(view.getContext(), MapActivity.class);
    myIntent3.putExtra("yourFilter", searchFilter);
    startActivityForResult(myIntent3, 1);
    

    Then in your MapActivity you can extract that data that you sent to it from the OnCreate or OnResume function (though really you can call it anywhere inside the activity).

    String[] filterYouJustSent = this.getIntent().getStringArrayExtra("yourFilter");
    

    filterYoujustSent in MapActivity should now have {"restaurants", "bars"} as its data.
    If you didn’t attach anything to that named extra, filterYouJustSent will be null.

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

Sidebar

Related Questions

In my App, first it shows a splash screen. After that another activity, then
Given a stack that displays characters to the screen First in First Out (FIFO),
When I load my iPhone app it always loads a black screen first then
I have an application. First I display a splash screen, a form, and this
I'm writing a program for iPhone that will first let the user take a
I have a simple VS setup project. On the first screen user inputs database
My i have to develop simple window based iphone application. In my first screen
I am working on a fairly basic screen layout for my first Android application
I have a screen with two RadioButtonField objects. By default, the first RadioButtonField shows
Here's my two scenarios. 1 - User opens app for the first time ever

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.