This is a migrated thread and some comments may be shown as answers.

Network connection Android Kendo UI

3 Answers 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 16 Oct 2013, 03:49 PM
Hi *,

I'm writting an application with Kendo UI, which schould build a https connection to a server. The application runs pretty well in the simulator, but after the installation on a mobile device (Android 4.1.2), the application is not able to build an Internet connection, namely a connection to the target server.

I use the following code to build the connection:
var check = new XMLHttpRequest();
                check.open("GET", "https://IP:PORT/test" ,false);
                check.setRequestHeader("Authorization", utils.getServerAuthString());
                check.onreadystatechange = function () {
                    if (check.readyState == 4) {
                        if (check.status == 200) {
                            utils.saveServerData();
                        } else {
                            utils.showError("status:" + check.status);
                        }
                    }
                }
                check.send(null);

From the mobile device, I always receive a value "0" as Status, namely "Status: 0" (See line 9).

By the ways, I also use the kendoui remote datasource to get data; however, it is not working too on the mobile device; see the following code.
viewModel: kendo.observable({
            datasource: new kendo.data.DataSource({
                    transport: {
                        read: {
                            cache: false,
                            url: URL,
                            dataType: "json",
                            beforeSend: function(req) {
                                req.setRequestHeader('Authorization', utils.getServerAuthString());
                            }
                        }
                    }
            })
        })

I hope you can help me.

Best regards,

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 16 Oct 2013, 04:08 PM
Hi Roman,

Android debugging is currently not trivial, as the Android port of WebKit doesn't provide a Web Inspector interface for its WebView. What you can do is use add console.log all over the problematic code and check out your device logs in Graphite's output pane or use remote web debugger like Weinre.

You can also setup Fiddler to intercept your device's traffic which would give you a clue what's going on by reviewing the requests/responses.

Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Roman
Top achievements
Rank 1
answered on 16 Oct 2013, 04:54 PM
Hi Steve,

Thank you for your promp answer.
I have configured fiddler as proxy for the mobile phone; after trying to execute the request, I could receive a response with the HTTP code 200 (in fidler) like expected, but the error in the application is still present. unfortunnaly, it's not possible for me to see the content of the response because of the HTTPS connection (Tunnel).

Please help!

regards,
Roman
0
Steve
Telerik team
answered on 17 Oct 2013, 02:34 PM
Hello Roman,

You need a FiddlerRoot certificate, see the instructions available here. Also Fiddler has "Decrypt HTTPS Traffic" option in Tools -> Fiddler Options -> HTTPS.

Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
General Discussions
Asked by
Roman
Top achievements
Rank 1
Answers by
Steve
Telerik team
Roman
Top achievements
Rank 1
Share this question
or