javascript - updating ionic 1.5.0 to 1.6.3 causes networking feature not to work - only happens on android -
when upgraded ionic 1.5.0 1.6.3 (latest), networking ajax calls not work anymore. not sure why. required remove android , re add android platform. not sure did change apk names mainactivity-debug.apk android-debug.apk
this problem happens on android not ios.
here simple ajax call:
$scope.dologin = function () { urlcd = "http://desolate-eyrie-5848.herokuapp.com/offsprings.json"; console.log("xxx:" + urlcd); var request = $http({ method: "post", url: urlcd, timeout: 90000, data: {email: email, password: password}//$scope.dologin }); request.success(function (data) { console.log('data: ' + data.status); }); request.error(function (data, status) { console.log('xxx error data:' + data + " status:" + status); });
here android debug traces:
07-30 11:32:18.399: i/web console(21850): xxx doing login @ file:///android_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js:173 07-30 11:32:18.399: d/pluginmanager(21850): exec() call unknown plugin: console 07-30 11:32:18.399: i/web console(21850): xxx:http://desolate-eyrie-5848.herokuapp.com/offsprings.json @ file:///android_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js:173 07-30 11:32:18.399: d/pluginmanager(21850): exec() call unknown plugin: console 07-30 11:32:18.459: d/chromium(21850): unknown chromium error: 0 07-30 11:32:18.459: i/web console(21850): xxx error data: status:0 @ file:///android_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js:173 07-30 11:32:18.459: d/pluginmanager(21850): exec() call unknown plugin: console
how can troubleshoot , ionic work networking on android ?
make sure have added whitelist plug-in. latest versions of cordova changed how whitelisting works.
Comments
Post a Comment