does CN1 framework (API) guarantee identical behavior between Android, iOS and hopefully the Simulator?

20 views
Skip to first unread message

DVR Alarm

unread,
Jun 23, 2016, 9:22:09 AM6/23/16
to CodenameOne Discussions
Does CN1 framework (API) guarantee identical behavior between Android, iOS and hopefully the Simulator?

I am seeing some differences in logic when my app runs on Android and iPhone.  The pseudo-logic is as below

main() {
    display_msg_detecting_corporate_network();  //1
    detect_network_connection();                           //2
    if(is_corp_network_available) {                         //3
      display_message_to_client_to_wait();            //4
      load_more_information();                                //5
     ......
    }
   else {                                                                  //6
     //corporate network unavailable     
     display_msg_corp_network_unavailable();      //7
     exit;                                                                   //8
   }
}

on the simulator and on Android the program executes in sequence as below

     when_corporate network available:  steps: 1 - 5
     when_corporate network unavailable: steps:  6 - 8

The issue is on the iPhone

    when corporate network unavailable:
         steps: 1,4 and 8
   
 how is it possible?

Steve Hannah

unread,
Jun 23, 2016, 4:21:55 PM6/23/16
to codenameone...@googlegroups.com
The devil will be in the details.  You'll need to post real code to comment.


--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/3a68588e-dd45-47b4-87d6-4a40449382b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

Shai Almog

unread,
Jun 24, 2016, 12:48:00 AM6/24/16
to CodenameOne Discussions
We don't guarantee that and no one can.

Behavior will always differ and you always need to test on devices, however it should differ within reasonable sensible well documented parameters as long as you stick to our API's/guidelines.

Keep in mind that the device implements things the simulator can't e.g. native input (VKB), native widgets etc.

Networking is implemented natively in the devices, on iOS this is especially different as restrictions from Apple exist that do not exist in other platforms e.g. https://www.codenameone.com/blog/ios-http-urls.html
Reply all
Reply to author
Forward
0 new messages