I'm new to Android and Cordova. I think I have solved a problem, but I don't know if there's a better way to solve this question.
I have to send push notifications from a web service to cordova app. I'm using the infobip service and it works perfectly. This provider has a plugin for cordova, that plugin override the onOverrideUrlLoading method in push-plugin-cordova-phonegap/push-cordova/src/android/Push.java
@Override
public boolean onOverrideUrlLoading(String url) {
Log.d(this.TAG, "onOverrideUrlLoading YEEEAAHH!!");
return true;
}
When I start the push service this method doesn't allow me to change the url. My application is multipage and I need to change it.
My solution is poor and simple: change the plugin...
@Override
public boolean onOverrideUrlLoading(String url) {
return false;
}
and that's it... it works! I can change the url in javascript.
What do you think?
Sorry for my English!
Thanks!