Search Unity

Android IAP adds app name to the title of the IAP

Discussion in 'Unity IAP' started by Carwashh, Aug 26, 2019.

  1. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    762
    I've recently published on iOS, and everything is running fine. My purchases show up correctly, for example "Unlock All Tracks (Remove Ads)" is displayed exactly like that.

    However, now I'm working on the Android version the name of the app gets added to the end of the titles, so the above becomes "Unlock All Tracks (Remove Ads) (Super 23 Racing Mobile)" ... I haven't added this text anywhere, I don't see any check boxes anywhere ... does anyone know what I've missed? I assume this isn't forced and can be removed somewhere?
     
    KIZILKAYA likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please share a screenshot and steps to reproduce. Where are you seeing this text?
     
  3. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    762
    Seeing it in the app, downloaded from the play store (doing a close access beta).

    Built with Unity 2019.2.2

    Steps, I'm not sure other than:
    - Use Codeless IAP buttons (I changed the classes to use TMP instead of Text)
    - Setup android IAP in the dashboard
    - Setup the IAP with the IAP catalogue
    - Build for android and publish
     

    Attached Files:

  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Not sure if the move to TMP changed anything, you would want to test. Generally you want to get the basics working first, before adding customization. Also, please show a screenshot of your products as defined on the Google Dashboard.
     
  5. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    762
    I'm fairly confident using TMP instead of the standard Text box hasn't caused any issues. All the change was (and is fine on iOS)

    From this:
    Code (csharp):
    1. public Text titleText;
    2. public Text descriptionText;
    3. public Text priceText;
    To this:
    Code (csharp):
    1. public TextMeshProUGUI titleText;
    2. public TextMeshProUGUI descriptionText;
    3. public TextMeshProUGUI priceText;
    See attached for the products on the Google Dashboard (the id's have been hidden)
     

    Attached Files:

  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry I can't see the names since they are hidden, that is what I was hoping to see. But you can always trim the name text if you want, before displaying since it will always be the same, and the logic would work on both platforms.
     
  7. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    762
    I hid the ID's (com.blahblah.iapthing), not the names?
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, my same recommendation remains. For customization, you would not want to use Codeless, but go the scripted route. There are Sample IAP projects here: https://forum.unity.com/threads/sample-iap-project.529555/
     
  9. LMMWidowGames

    LMMWidowGames

    Joined:
    Mar 4, 2020
    Posts:
    1
    Hi Everyone, I'm having the same issue named by Carwashh. I'm using Unity 2018.4.6f1 and running the game in Android. The build is a development build.


    I have been checking the logcat with some debug logs and it seems that the parenthesis enclosed name is coming from IAP.


    I have followed every step of this Official Manual:
    https://docs.unity3d.com/Manual/UnityIAPCodelessIAP.html

    Can you give us some insight of why this is coming?, I can workaround it, but I understand this should't work like it does.
     

    Attached Files:

  10. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    Unity IAP gets metadata from the store. The content of the metadata depends on the store. You may need to process the title string by yourself.
     
    JeffDUnity3D likes this.
  11. Toastbyte

    Toastbyte

    Joined:
    Sep 1, 2016
    Posts:
    54
    Im having the same issue right now. Does anyone know how to fix it? I used codeless IAP like Im supposed to.
    Does it have to do with the fact that the game first needs to get processed by various Google servers first before all information is loaded correctly? On iOS it works fine. @SamOYUnity3D
     
    KIZILKAYA likes this.
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We are passing along the string as provided by the Google billing library. You will need to parse the text yourself if you need, as mentioned in previous posts.
     
    Toastbyte likes this.
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No immediate plans, we generally don't want to parse the data the library returns.
     
    KIZILKAYA and Toastbyte like this.
  14. KIZILKAYA

    KIZILKAYA

    Joined:
    Jun 22, 2015
    Posts:
    2
    Hi, did you find solution?
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would parse the string as mentioned previously. I'll mention it to the team again
     
  16. SteveKouts

    SteveKouts

    Joined:
    Aug 23, 2012
    Posts:
    79
    My game is also doing this with codeless IAP on Android Unity 2019.2.
    Whats the fix?
     
  17. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @SteveKouts We had one user who claimed they had success by commenting out the code in the UpdateText method in IAPButton.cs
     
    SteveKouts likes this.