Android Question Different behaviors between mobiles ?

Discussion in 'Android Questions' started by lemonisdead, Apr 13, 2015.

  1. lemonisdead

    lemonisdead Well-Known Member Licensed User

    Hello,

    Please how do you deal with the differences of behavior between two mobiles ? Time to time, I discover things I didn't want and hadn't seen while prototyping.

    For example : this morning, I had a bug report because I was sending a urlencoded string to a server using httputils2. The string contained an exclamation mark... I never never had any error previously.

    Please do you put a try/catch including all your code ? I guess you don't...

    Thanks
     
    Last edited: Apr 13, 2015
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Dont put a try/catch everywhere. That will just cause the code to fail silently and impossible to debug.
    How did the string get an exclamation mark and what makes you think it was device dependent?
    I've had weird characters in my requests but they were down to user issues.
     
    Peter Simpson, DonManfred and NJDude like this.
  3. lemonisdead

    lemonisdead Well-Known Member Licensed User

    Hello,

    Thanks a lot for your reply. That's super kind of you.

    It was the user input in an EditText.
    The content is put into a string, urlencoded and sent to a server which urldecodes it, stores it in a text file and replies "OK".
    That's basic.
    Because when I was prototyping, I never got the same issue. I had made tests with a lot of phones.

    And in fact, my client told me that the code worked on 22 phones but not on the 23th...

    I can understand that. That's the reason why, we developers, do a lot of testing, try to secure the user's inputs, etc. That's OK for me but what makes me very uncomfortable is not being able to understand why on some models the app could not work even if the Android's version is about the same...
     
  4. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Thats weird, because an exclamation mark is a valid charachter (it doesnt get urlencoded).
    I've really stopped caring about obscure device issues, if someone has such a device then they are probably aware that half the things wont work on it.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice