Closed fenzik closed 9 years ago
Can you paste console logs from the device? Server would not reply 210 error for no reason.
Attached the snapshot of the error. Kindly let me know if you need more information.
Thanks
Could you paste logs from the console / ddms?
Please email me when you find the log.
Best regards, Fenzik On Dec 16, 2014 11:28 AM, "shaders" notifications@github.com wrote:
Could you paste logs from the console / ddms?
— Reply to this email directly or view it on GitHub https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin/issues/64#issuecomment-67116126 .
No logs attached.
Sorry I forgot to attach the log file in my previous not. You can see the log here http://tny.cz/71024d10
Unfortunately logs does not contain the request body.
onDeviceReady: function() {
app.receivedEvent('deviceready');
ons.setDefaultDeviceBackButtonListener(function() {
if (navigator.notification.confirm("Are you sure to close the app?",
function(index) {
if (index == 1) { // OK button
// clear local storage before logout
window.localStorage.clear("currentuser");
navigator.app.exitApp(); // Close the app
}
}
));
});
// Open any external link with InAppBrowser Plugin
$(document).on('click', 'a[href^=http], a[href^=https]', function(e){
e.preventDefault();
var $this = $(this);
var target = $this.data('inAppBrowser') || '_blank';
window.open($this.attr('href'), target);
});
// Initialize Push Notifications
// Uncomment the following initialization when you have made the appropriate configuration for iOS - http://goo.gl/YKQL8k and for Android - http://goo.gl/SPGWDJ
app.initPushwoosh();
}
We are using Sensation Hybrid app ( http://codecanyon.net/item/sensation-phonegapcordova-full-hybrid-app/8004904 ). We followed a document to configure the pushwoosh plugin (http://goo.gl/SPGWDJ). They have separate pushwoosh js file. There we update the google_project_number and pw_application_code (pushwoosh application code)
What is the code of this function: app.initPushwoosh();
The code for app.initPushwoosh()
// Register device for Push Notifications
initPushwoosh: function() {
var pushNotification = window.plugins.pushNotification;
if(device.platform == "Android") {
registerPushwooshAndroid();
}
if (device.platform == "iPhone" || device.platform == "iOS") {
registerPushwooshIOS();
}
}
You can see the pushwoosh-android.js file for reference http://pastebin.com/uankCH5j
Thank you, one more question - what version of the Pushwoosh plugin do you use?
We are using 3.0 (https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin.git)
Could you please update to the 3.4.2 (if using PGB) or 3.4.5 (if using CLI)
Updated plugin to 3.4.5 Still we are getting error. Attached log file. Please check in http://pastebin.com/kShaXU3r
Do you have link to the apk I could try on the device?
Shared link of Mobile app for pushwoosh testing - https://www.dropbox.com/s/8cq4krp8g7169b1/SmackTest.apk?dl=0
Hi,
The file you posted is not APK file and is not valid.
java.util.zip.ZipException: error in opening zip file
Hi, On behalf of fenzik, Shared a link to download the .apk file of our extension - https://www.dropbox.com/s/xjmuygwm0u460el/SmackTest-Updated.apk?dl=0. Tested the link on mobile
— Thanks, Rajkumar Mohan
On 29 December 2014 at 11:05:58 am, shaders (notifications@github.com) wrote:
Hi,
The file you posted is not APK file and is not valid.
java.util.zip.ZipException: error in opening zip file
— Reply to this email directly or view it on GitHub.
In your index.html file you include pushwoosh-android.js, then include pushwoosh-ios.js.
<script type="text/javascript" src="js/pushwoosh-android.js"></script>
<script type="text/javascript" src="js/pushwoosh-ios.js"></script>
In pushwoosh-android.js you define:
// PushWoosh Application Code
var pw_application_code = "VALID_PUSHWOOSH_APP_CODE";
However in pushwoosh-ios.js you override this with:
// PushWoosh Application Code
var pw_application_code = "XXXXX-XXXXX";
That's why you receive application not found error, because pw_application_code variable is now XXXXX-XXXXX!
Hi, It works now !!! Thanks for your help
-- Thanks, Rajkumar
On 29 December 2014 at 3:09:57 pm, shaders (notifications@github.com) wrote:
In your index.html file you include pushwoosh-android.js, then include pushwoosh-ios.js.
<script type="text/javascript" src="js/pushwoosh-android.js"></script>
<script type="text/javascript" src="js/pushwoosh-ios.js"></script>
In pushwoosh-android.js you define:
// PushWoosh Application Code
var pw_application_code = "VALID_PUSHWOOSH_APP_CODE";
However in pushwoosh-ios.js you override this with:
// PushWoosh Application Code
var pw_application_code = "XXXXX-XXXXX";
That's why you receive application not found error, because pw_application_code variable is now XXXXX-XXXXX!
— Reply to this email directly or view it on GitHub.
@shaders We should have verified it. Thanks for you time.
We are developing an android app using Phonegap and using Pushwoosh extension for push messages. We followed instructions based on this link to configure the extension - http://goo.gl/SPGWDJ
Now we are getting "Application not found" code - 210 error on executing the android app We provide google_project_number and pw_application_code correctly. Referred all the open and closed issues for the same kind issues. Please advice to resolve it.
Phonegap version - 3.6.3-0.22.1 (Mac) Our application_code - F6220-3CC33
Thanks in advance.