PhoneGap/Cordova upgrade to latest version application stop working

37 views
Skip to first unread message

Huzoor Bux

unread,
Dec 14, 2015, 12:21:18 PM12/14/15
to phonegap

I have upgraded my android application from phonegap version 3 to version 5 and application stoped working my jQuery not working anymore.

my jQuery:

<script type="text/javascript" charset="utf-8" src="scripts/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="scripts/cordova.js"></script>
<script>
document.addEventListener("deviceready", loginWithuuid, false);
function loginWithuuid() {
    var usr = window.localStorage["user_id"];
    if(usr == "")
    {
        $("#voucher").hide();
    }
}
function openDeviceBrowser(externalLinkToOpen)
{
    window.open(externalLinkToOpen, '_system', 'location=no');
}
</script>
<script>
    var serviceURL = "http://<web>.com/API/";
    function loginNow() {
        navigator.notification.activityStart("Wait","Authenticating....");
        var email       = $('#contactEmailField').val();
        var password       = $('#contactPasswordField').val();
        $.getJSON(serviceURL + 'androidapi.php?email='+email+'&password='+encodeURIComponent(password)+'&action=login', function(data) {
        if(data.result == 1){
            window.localStorage["user_id"] = data.login;
            window.localStorage["user_name"] = data.name;
            navigator.notification.activityStop();
            window.location="home.html";
            return false;
        }
        else
        {
            navigator.notification.activityStop();
            alert(data.message);
            return false;
        }
    });
}
</script>

This code work perfect before update and now its not working.

jcesarmobile

unread,
Dec 14, 2015, 12:34:00 PM12/14/15
to phonegap
What is "not working" for you? Do you have any error message on logcat? And if you inspect your app in chrome?

Huzoor Bux

unread,
Dec 14, 2015, 12:38:32 PM12/14/15
to phon...@googlegroups.com
undefined function activityStart, and i removed that function and tried then no error but no request sent to server

On Mon, Dec 14, 2015 at 10:33 PM, jcesarmobile <jcesar...@gmail.com> wrote:
What is "not working" for you? Do you have any error message on logcat? And if you inspect your app in chrome?

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/uMUXmraH3NY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,

Huzoor Bux
+92-333-2964270
Reply all
Reply to author
Forward
0 new messages