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 6950409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:05:19+00:00 2026-05-27T14:05:19+00:00

I have an Android application that utilizes a paid sponsor Image Button at the

  • 0

I have an Android application that utilizes a paid sponsor Image Button at the bottom of each activity. Touching the Image Button launches either another activity that displays the sponsor’s internal (to the app) profile, or launches a Web View. Using the Web View example, I pass the URL to the Web View using the Intent’s Extra parameter:

Intent i = null;        
i=new Intent (EventMain.this, SponsorWebView.class);
i.putExtra(URL_EXTRA, selectedSponsor.get("url"));
startActivity(i);

…and in the Web View:

url=getIntent().getStringExtra(EventMain.URL_EXTRA);

Clearly, the problem lies in the fact that the getIntent() function requires the calling activity, EventMain, to be hard coded in the getStringExtra() parameter list.

While this works just fine for a single activity, the sponsor bar is to appear on multiple activities in the app. I can’t believe the solution is to duplicate the Web View for each calling Activity, substituting only the name of the calling Activity in the getStringExtra() parameter list.

Any assistance would be greatly appreciated.

  • 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-27T14:05:19+00:00Added an answer on May 27, 2026 at 2:05 pm

    The solution is as follows:

    In the calling class, create a static string in each class that will be launching the target activity:

    public final static String LINK_EXTRA="LINK";
    

    All other code in the calling activity remains the same:

    Intent i = null;
    i=new Intent (EventMain.this, MapView.class);
    i.putExtra(LINK_EXTRA, selectedSponsor.get("url"));
    startActivity(i);
    

    And in the destination activity, change this:

    link=getIntent().getStringExtra(EventMain.LINK_EXTRA);
    

    to this:

    Bundle extras = getIntent().getExtras();
    link = extras.getString("LINK");
    

    Works like a charm.

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

Sidebar

Related Questions

I have an android application that starts an activity and is running well. I
I have an android application that parses some HTML, downloads an image, and displays
Lets say I have an android application that shows an image of a pillow.
I have an android application that needs to zoom an image about centre. i
I have an Android application that uses speech recognition in an Activity. The GUI
I have an Android application that contains two Activities . Activity A has a
I have an android application that launches the webview. When any link is clicked
I have an android application that's a link to a magazine website. The activity
I have an Android application that connects to Facebook to request authorization of an
I have a Web Service and an Android application that uses this web service.

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.