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

Simulator Network Connection Doesn't Work

4 Answers 139 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frank
Top achievements
Rank 1
Frank asked on 25 Jun 2013, 03:04 PM
What a completely awesome feature that was added... that is completely useless in the state it is in!

If I select NONE I would expect no network connection is available and all network calls would fail.  As it is now, setting to "NONE" doesn't do anything!  

What a waste of time.

From the documentation:

Simulate Network Connection Type

In the simulator, you can set the current network connection type for the device.

Setting the network connection type in the simulator changes the connection.type property for the Apache Cordova Connectionobject but does not affect the network connectivity. For example, when you select None, the network connection is not disabled and you can still make network requests in the simulator.

4 Answers, 1 is accepted

Sort by
0
Matt Gmail
Top achievements
Rank 1
answered on 25 Jun 2013, 11:05 PM
I wouldn't say completely useless.  I use it to detect the state before any action and decide what to do based on that.
0
Deyan Varchev
Telerik team
answered on 27 Jun 2013, 03:38 PM
Hello Frank,

 Your feedback for our new feature is greatly appreciated. As we've mentioned numerous times, Icenium is greatly influenced by our users and we take your suggestions really seriously.

 Your observation is spot on - currently if you set your network connectivity simulation state to "None", it won't cut off all of your app's requests. It controls only the cordova api responsible for connectivity - namely the  navigator.connection.type property. You can check more details on the API here.

 This is the first time we show this feature to the public to get your feedback. It's a great pleasure for us to see such active and strongly opinionated community. We'll do our best to meet your needs and incorporate an improvement in a future release that will control not only cordova APIs but also all requests.  

 Again thanks a lot for the feedback and keep it coming.

Regards,
Deyan Varchev
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Tim
Top achievements
Rank 1
answered on 01 Oct 2013, 12:19 PM
Hi Frank

I too think this would be a handy tool to have.  Is there currently any way in which i can simulate the device being offline so that it can be detected with navigator.onLIne or is connection state sufficient to identify the device as offline?

Thanks
0
Steve
Telerik team
answered on 01 Oct 2013, 04:20 PM
Hi Tim,

The "Network Connection" functionality of the simulator has not been changed since its initial release and it still works as described in the documentation. In a real world app you would check the Cordova Connection object and based on its type, judge whether you're offline and handle appropriately.

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
Report a bug
Asked by
Frank
Top achievements
Rank 1
Answers by
Matt Gmail
Top achievements
Rank 1
Deyan Varchev
Telerik team
Tim
Top achievements
Rank 1
Steve
Telerik team
Share this question
or