Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Navigator.notification.alert not work correctly on real device and xcode simulater.

Hello,

Everything should work correctly.Please clarify on what OS do you have problems? Please look for errors in Weinre: (http://devcenter.appery.io/documentat...)

pakbull6772540
Posts: 0
Joined: Sun Mar 30, 2014 4:08 pm

Navigator.notification.alert not work correctly on real device and xcode simulater.

Any updates on this item?
When I use the cordova

function showAlert(txt) {
navigator.notification.alert(
txt, // message
alertDismissed, // callback
'hse2go Alert', // title
'Done' // buttonName
);
}

get error message:
Uncaught TypeError: Cannot read property 'alert' of undefined

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Navigator.notification.alert not work correctly on real device and xcode simulater.

Hello,

Could you please clarify, do you test it on device? It will work only on device (neither in the tester nor in the browser will not work).

Prafull Agarwal
Posts: 0
Joined: Thu Jul 24, 2014 10:47 am

Navigator.notification.alert not work correctly on real device and xcode simulater.

Hi Evgene Karachevtsev

Sorry for the late response. I am creating Mobile app for android as well as iOS platform. We are facing the issues for Android devices for iOS everything works fine. The issue is when we start our Android app for some time all alerts and its callbacks works fine . But after some time alerts callbacks are not executing for first time we have to press the button second time so that its callbacks is executed. There is no error with in our code as we are using same code for iOS and Android.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Navigator.notification.alert not work correctly on real device and xcode simulater.

What Android versions do you use for testing?
Please share (http://devcenter.appery.io/documentat...) your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and send us the app name and exact steps to reproduce the error.

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Navigator.notification.alert not work correctly on real device and xcode simulater.

Hello,

I am facing the same problem that navigator.notification.alert is not working on xcode simulator. (Works in Appery.io Tester App) ..

So Apple rejects my app because of this bug.

The function :
I invoke a rest service and after error, i want to give an alert to user).

I have "Google Map Component", "i18next","Facebook Login", etc.

I couldn't found which one is causing or why doesn't it work?

In simulator console(safari develop), "TypeError: undefined is not an object 'navigator.notification.alert')

Also when i want to use the camera, it says:
CameraService can't process request because navigator.camera is undefined.

Why doesn't cordova plugins work?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Navigator.notification.alert not work correctly on real device and xcode simulater.

Hello -

You can't use or call device native APIs in xCode simulator, this will work only on a device.

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Navigator.notification.alert not work correctly on real device and xcode simulater.

Hello Illya,

I can use apis in xcode simulator. I found the problem that i edited "cordova_plugins.js" source file. Undo source resolved it.

Now in xcode, "navigator.notification.alert" is working. No need to work on real device.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Navigator.notification.alert not work correctly on real device and xcode simulater.

Thank you for information and update here!

Return to “Issues”