Search Unity

Bug button works on samsung s7 but not honor 9

Discussion in 'Editor & General Support' started by lz7cjc, Apr 1, 2021.

  1. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    541
    Hi
    I have uploaded by apk to beta test and when i open on samsung s7 the buttons on the first screen work but not on the honor. When i install locally the button works on both phones

    How can I debug?
    thanks
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Start with
    adb logcat
    , see if there are exceptions.

    After that, to help gain more insight into your problem, I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.

    Doing this should help you answer these types of questions:

    - is this code even running? which parts are running? how often does it run?
    - what are the values of the variables involved? Are they initialized?

    Knowing this information will help you reason about the behavior you are seeing.
     
    lz7cjc likes this.
  3. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    541
    i was a little nervous i wouldn't understand the output but I don't get anything when i tap my buttons; it is as if the interface is dead
    If I install the apk direct to the phone it is fine. This is just a problem for this particular phone when I download from Google Play.

    It is a huawei and I know there was a problem with using google services but if i can use Google Play is it fair to say that is a red herring? Any ideas how I can find the problem as i am stumped
    thanks
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    If you are installing the same exact binary locally vs Google Play, that is something I have never seen with basic app functionality. Usually a difference like this is limited to third party SDKs that rely on app signatures.

    I think you're going to have to put more code in to find if something as simple as printing
    Input.touches.Length()
    on the screen to see if it is reasonable (check if touches are getting through), or otherwise back up to make a fresh empty project (with the same keystore and app bundle identifier) that just changes some text when a button is pressed, see if that works, just to get some insight.
     
    Joe-Censored likes this.
  5. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    541
    thanks for this advice - will give it a go
     
  6. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    541
    is it possible that the app can install but the code corrupts? So the initial screen loads but there are problems thereafter?
    I am using the split file obb option due to the size of the app

    When I uninstalled to work on the debug version you suggested, then reinstalled the full app it started working!

    very odd - perhaps something to do with the obb?
     
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    I saw somewhere that OBBs are deprecated and the new Android hotness is AAB. I don't personally know the details because my apps are all under the 100mb limit.
     
  8. lz7cjc

    lz7cjc

    Joined:
    Sep 10, 2019
    Posts:
    541
    yes i saw that notice but not ready to get my head around another new system! Will switch over in future releases but not risking it ahead of a social media blast that is now overdue