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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:31:01+00:00 2026-05-31T18:31:01+00:00

I am working on an app for android using phonegap and unity. I wrote

  • 0

I am working on an app for android using phonegap and unity.
I wrote a plugin for phonegap that starts a new activity from phonegap that loads the unity player. When i hit the back button in the unity activity i want to go back to the phonegap activity and load my webcontainer again, but with a different url.
Whatever i try, it still loads the URL i loaded the first time. Is there any way to fix that?
Here is the Activity:

public class PhonegapCallsActivity extends DroidGap {

private static Boolean backButton;

    private static String url;
    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        Bundle extras = getIntent().getExtras();
        if (extras == null) {
            Log.d("false","ERROR");
                //load index.html when i enter first time
            super.loadUrl("file:///android_asset/www/index.html");  
            return;
                }

        else{
        backButton = extras.getBoolean("backButton");
            //load #two when i come back
                Log.d("true","ERROR");
            super.loadUrl("file:///android_asset/www/index.html#two");

        } 
}

Note that logcat is tracing true and false correctly, so my variables are set properly.
I always get the index.html loaded, never index.html#two. Is it stored somewhere?

  • 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-31T18:31:02+00:00Added an answer on May 31, 2026 at 6:31 pm

    You are doing it right but you are running into an Android bug. Go star:

    • https://code.google.com/p/android/issues/detail?id=17535
    • https://code.google.com/p/android/issues/detail?id=17327

    In the mean time the best way to work around this issue is to store a flag in localStorage to check if you should be loading page one or page two in the JavaScript.

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

Sidebar

Related Questions

I am developing an Android app using Phonegap and jQueryMobile, working in Eclipse. I
Am making a basic phonegap based android app. All working perfectly and using localstorage
I have Phonegap's Facebook plugin working perfectly within my Android app. This plugin uses
I am working on an Android app that utilizes the Google Maps API MapView,
Building an app using android.support.v4.app , targeting API level 8. Everything's working as planned
I am working on sending Meeting Invites from my Android app. Here is the
I'm working on an Android app that connects to .NET webservices. I use the
I developed an App for Android and iOS using Phonegap. Both Apps are already
I'm working on making an iPhone version of an Android app that I've written
I'm working on creating a checkbook app for android using a database to record

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.