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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:46:28+00:00 2026-06-08T07:46:28+00:00

Phonegap notifications ( navigator.notification.alert and navigator.notification.confirm ) are not working while using shouldStartLoadWithRequest for

  • 0

Phonegap notifications (navigator.notification.alert and navigator.notification.confirm) are not working while using shouldStartLoadWithRequest for URL request processing.

Javascript:

function onBodyLoad() {
  document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady() {
  navigator.notification.alert("Cordova is working");
}

Objective C:

- (BOOL)webView:(UIWebView *)webView2
shouldStartLoadWithRequest:(NSURLRequest *)request
  navigationType:(UIWebViewNavigationType)navigationType{
    if ([[[request URL] absoluteString] hasPrefix:@"js-call:"]) {
      // Extract the selector name from the URL
      NSString *requestString = [[request URL] absoluteString];
      NSArray *components = [requestString componentsSeparatedByString:@":"];
      NSString *function = [components objectAtIndex:1];
      NSLog(@"the function name is  %@",function);
      // Call the given selector
      [self performSelector:NSSelectorFromString(function)];
      // Cancel the location change
      return NO;
    }
    return YES;
  }

Please help me out.

  • 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-08T07:46:29+00:00Added an answer on June 8, 2026 at 7:46 am

    Ran into very similar issue. Changing the last line

    return YES;
    

    to

    return [super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
    

    All commands to plugins go through gap:// bridge. shouldStartLoadWithRequest gets called for every such call. So, defaulting to YES appears to be the issue. When in fact, it should return NO for gap:// calls.

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

Sidebar

Related Questions

In my PhoneGap 1.3 offline app I'm using modified iOS local notification plugin found
I want to add statusbar notifications to my HTML 5 Phonegap JavaScript application. Is
Got Phonegap working, but not seeing the staticmap.png image for your current location <div
Ok so I have been using phonegap for a while for IOS apps. I
Is there a push notification plugin/approach for phonegap (android/iphone) where: the application can still
In PhoneGap how do I create/open a database in Android? I am using this
I'm using PhoneGap. And read it and created my work. http://docs.phonegap.com/en/1.9.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android And i added
I am working on a Phonegap app, in which I access device's contacts. I
I am using phonegap and sqlite to develop cross-platform mobile app for android,ios,blackberry.For reference
In my project I used navigator.notification.activitystart(Title,Message). But it is just showing the title as

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.