private static PromoItem[] GetItemArray(object rawArray)
        {
            if (rawArray is List <object> rawItems)
            {
                var items = new PromoItem[rawItems.Count];
                for (var i = 0; i < rawItems.Count; i++)
                {
                    items[i] = GetItemFromDictionary(rawItems[i]);
                }

                return(items);
            }
            return(new PromoItem[] {});
        }
        private PromoItem[] GetItemArrayFromJavaArray(AndroidJavaObject javaArray)
        {
            if (javaArray == null)
            {
                return(default(PromoItem[]));
            }

            var size  = javaArray.Call <int>("size");
            var items = new PromoItem[size];

            for (var i = 0; i < size; i++)
            {
                items[i] = GetItemFromJavaObject(javaArray.Call <AndroidJavaObject>("get", i));
            }

            return(items);
        }