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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:22:03+00:00 2026-06-11T14:22:03+00:00

THe problem is little difficult to convey, The Actual scenario will be help you

  • 0

THe problem is little difficult to convey, The Actual scenario will be help you guys to understand the real problem.

In the Android Application.

I have a lot of the Jquery Mobile Page append to the android Webview.

When i select one Page (E.g) Profile , the page opens properly and if i press the back button, the application moves to the main page, if i again select profile and press back the application goes to the login page.

if i select some other page and select the profile this is not happening. this issue is not only with the single page. in all the page i have the same issue. Can some one guide me what should i have do?

The Source code of the Key Press event,
enter code here

   @Override
        public boolean onKeyDown(int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_BACK && webview.isEnabled()
            && !this.onLogin) {

        webview.loadUrl("javascript:handleDeviceBack()");
        return true;
    } else if (keyCode == KeyEvent.KEYCODE_BACK && this.onLogin) {
        moveTaskToBack(true);
    }
    if (keyCode == KeyEvent.KEYCODE_HOME) {
        webview.loadUrl("javascript:handleDeviceHome()");
        return true;
    }
    return false;
}

In my web view,

enter code here
 handleDeviceBack = function(status) {
mHealth.util.logMessage('On device Back');
var historyBack = {
    "home" : "page",
    "loginPage" : "page",
    "welcomeMsg" : "page"
};
var moduleIndex = {
    "assessNotFound" : "../../home/view/home.html",
    "showActivity" : "../../home/view/home.html",
    "showMessage" : "../../home/view/home.html",
    "show_tracker" : "../../home/view/home.html",
    "settingsPage" : "../../home/view/home.html"
};
var graphPages = {
    "singlehealthdatapage" : "page",
    "multiplehealthdatapage" : "page"
};
var otherShortcuts = {
    "show_tracker_view" : "../../trackers/view/showtracker.html",
    "detailMessage" : "../../messages/view/showmessage.html",
    "alfrescoDIV" : "../../messages/view/showmessage.html"
};
// var exitAppCriteria={ "home" : "page","loginPage" : "page","welcomeMsg" :
// "page"};

if($('.ui-page-active').attr('id')=="condition_index")
    {
        $.mobile.changePage("../../home/view/history.html");
    }
else if (historyBack[$('.ui-page-active').attr('id')]
        || $('body').children().is('#tandcPage')) {
    Android.finishActivity();
} else if (moduleIndex[$('.ui-page-active').attr('id')]) {
    Android.highlightHome();
    $('.ui-alert-wallpaper').detach();
    $.mobile.changePage(moduleIndex[$('.ui-page-active').attr('id')]);

} else if (graphPages[$('.ui-page-active').attr('id')]) {
    Android.showTab();
    Android.pageHistory();
} else if (otherShortcuts[$('.ui-page-active').attr('id')]) {
    $.mobile.changePage(otherShortcuts[$('.ui-page-active').attr('id')]);
} else {

    $('.dw').detach();
    $('.dwo').detach();
    $('.dw').detach();
    $('.ui-alert-wallpaper').detach();
    Android.showTab();
    Android.pageHistory();
}

};

I found the problem is with the Android.pageHistory();

enter code here
    public void pageHistory() {
    this.activity.runOnUiThread(new Runnable() {

        @Override
        public void run() {
            // TODO Auto-generated method stub
            WebContainerActivity.webview.goBack();

        }
    });

}

Where First time its running properly but if the function called repeatly the web view.go back to the first page.

  • 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-06-11T14:22:04+00:00Added an answer on June 11, 2026 at 2:22 pm

    Hard coded the URL by their ID and solved the issue temporarily.

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

Sidebar

Related Questions

i have a little problem with my java socket code. I'm writing an android
I started working on Android applications and I find little difficult to understand this
I have little problem with a replacement of a little part in an url.
I have little problem in regular expressin creation. Expected input: blahblahblah, blahblahblah, 'blahblahblah', blahblahblah,
I have a little problem about the sort direction of a specific column in
I have a little problem with Jquery getJSON function. my json here { entries:
I have a little Problem with the app that I'm developing. In the App
I have a little problem. This is my code: stackPanelShapesContainer = new StackPanel(); InitializeStackPanle();
I have a little problem about Google Maps. I'm using Geocoding (xml) for getting
I have a little problem with the library 'Telerik'. Indeed I want to implement

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.