Dear All

i am using pushwoosh with cordova (cross platform) and i have installed ios , android platform and installed these plugin in cordova :-

  • geoloction
  • pushwoosh
  • whitelist

when i run the android via android stduio the debugger gives me these error :-

03-18 22:04:10.401 4199-4199/com.ajeer.production I/chromium: [INFO:CONSOLE(59)] "Uncaught module com.pushwoosh.plugins.pushwoosh.PushNotification not found", source: file:///android_asset/www/cordova.js (59)

but on ios it's works fine and register the mobile and i can see it in pushwoosh dashboard

but with android it not register at all

please your support guys with this issue

thank you

asked 18 Mar '16, 20:34
int3rnet's gravatar image

int3rnet
112

Hi!

Could you please try our Sample Application and see whether the issue is reproducible?

Here is the link to our Sample app:

https://github.com/Pushwoosh/pushwoosh-phonegap-cordova-sample

permanent link
answered 21 Mar '16, 05:35
Nikolai's gravatar image

Nikolai
3585

Change your plugin require to

var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");

instead of

var pushNotification = cordova.require("com.pushwoosh.plugins.pushwoosh.PushNotification");

permanent link
answered 21 Mar '16, 09:19
AhmedShady's gravatar image

AhmedShady
111

If I use Cordova iOS 4.0.1 (from PhoneGap Build cli-6.0.0) It won't work using pushwoosh-cordova-plugin.PushNotification with plugin version 4.2.2. I've downgraded to plugin 4.2.0 and "com.pushwoosh.plugins.pushwoosh.PushNotification"

permanent link
answered 01 Apr '16, 00:08
victor's gravatar image

victor
114

edited 01 Apr '16, 00:11

dear all

the problem has been solved , i think the problem because the code that indicate the OS of mobile with this line :-

var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");
    if (device.platform == "Android") {
        registerPushwooshAndroid();
    }

    if (device.platform == "iPhone" || device.platform == "iOS") {
        registerPushwooshIOS();
    }

    if (device.platform == "Win32NT") {
        registerPushwooshWP();
    }

    if (device.platform == "windows") {
        registerPushwooshWindows();
    }

so i used my own code to indicate the ios and here is the code :

var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");
    var userAgent = navigator.userAgent || navigator.vendor || window.opera;
    if( userAgent.match( /iPad/i ) || userAgent.match( /iPhone/i ) || userAgent.match( /iPod/i ) )
        {

                //alert("this is iphone");
        registerPushwooshIOS();

        }else if( userAgent.match( /Android/i ) )
        {
            //alert("this is android");
            registerPushwooshAndroid();}
}

just change the old code with this one , for any support or help please write here

permanent link
This answer is marked "community wiki".
answered 05 Apr '16, 15:20
int3rnet's gravatar image

int3rnet
112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×446
×444
×190

question asked: 18 Mar '16, 20:34

question was seen: 1,322 times

last updated: 05 Apr '16, 15:20