Search Unity

Analytics.Transaction: converting price to decimal

Discussion in 'Unity Analytics' started by litebox, Oct 28, 2015.

  1. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    158
    The price amount for iOS and Android in-apps are strings, and to send it to Analytics.Transaction() we have to convert it to decimal.
    However, For iOS this is simple:
    decimal price = decimal.Parse(product.price);
    because price contains numeric value. But for Android this is not so easy, because price is formatted like $0.99 or 14.28₴, etc.
    Are someone found a solution to get/parse Android decimal price at Unity side?

    Thanks.