Hi

i have followed all the steps to add pushwoosh to my android project in phonegap, all is well only problem i am getting is when i have added this plugin to my src/com folder, it shows error in PushNotifications.java file right after refreshing in eclipse, it shows error as The import org.apache.cordova.CallbackContext cannot be resolved

Can anyone please help me with this problem..

thanks - Swan

This question is marked "community wiki".
asked 18 Jan '14, 13:21
intellectlogic's gravatar image

intellectlogic
1516

Please don't forget to mark correct answer as "accepted". Thanks!

(20 Jan '14, 16:30) shader shader's gravatar image

Hi,

Which version of Cordova do you use? Before 3.0 the import used to be:

 import org.apache.cordova.api.CallbackContext;

Please note .api art in the import.

After Cordova 3.0 the namespace has been changed and became as it is now:

 import org.apache.cordova.CallbackContext;

If you are using Cordova < 3.0 it might be very good idea to upgrade to the latest version.

permanent link
answered 19 Jan '14, 03:04
shader's gravatar image

shader
3.9k7

It looks like you miss these lines in your config.xml:

For Cordova < 3.0:
<plugin name="PushNotifications" value="com.pushwoosh.plugin.pushnotifications.PushNotifications" onload="true"/>

(Just FYI) For Cordova 3.0 and above these lines looks a bit different with the same meaning:

<feature name="PushNotification">
<param name="android-package" value="com.pushwoosh.plugin.pushnotifications.PushNotifications"/>
</feature>

permanent link
answered 19 Jan '14, 17:25
shader's gravatar image

shader
3.9k7

Do you have any logs from the console? Do you have App ID entered correctly in registerDevice call?

permanent link
answered 20 Jan '14, 16:15
shader's gravatar image

shader
3.9k7

Hi

thanks for reply and by adding .api in import has helped and now the error is not there at least in eclipse and it executes, but when it now gives error of Fail to register: class not found..

can you help..please

permanent link
answered 19 Jan '14, 15:09
intellectlogic's gravatar image

intellectlogic
1516

hi

thank you so much for all your help, now my app is taking token and runs without error, but when i see from pushwoosh control panel i dont see any subscriber registered and hence even after creating push notification its not getting delivered.

Any guide for this problem

permanent link
answered 19 Jan '14, 18:07
intellectlogic's gravatar image

intellectlogic
1516

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:

×165
×30

question asked: 18 Jan '14, 13:21

question was seen: 3,550 times

last updated: 20 Jan '14, 16:30