API Method to track Android app Performance - android

I'm writing a SpringBoot application that keeps statistics of our app. I want to be able to make a report of daily/monthly downloads of our app. So far, I've found Andlytics, but the proyect is outdated. Is there a Google API that provides downloads data?
Can Analytics be used to make custom queries?

After a cursory review of the Google Play Developer API Reference and Guide, it does not look like they offer an explicit means of querying download statistics. You might start there to see if anything could be of use, though.
Firebase Analytics would also be a good starting point.
Link your Firebase app to BigQuery where you can perform custom analysis on your entire Analytics dataset and import other data sources.

Related

Google APIs to get app revenue of all apps

I'm trying to get app revenue through Google Play purchases of Android apps from a Google API.
The aim is to display a list of all apps with their revenue, the sum of all together and, if possible, to drill down to see the revenue per country.
I saw that this can be done with Google Analytics Data API. The problem is that I need to add the property ID of the apps as a path parameter. But there is no method to get a list of all properties.
I already searched other APIs to find a way to do so.
Google Play Android Developer API, doesn't offer a list of apps
or property IDs neither. It anyway does not serve a method to see the overall revenue of an app
Google Analytics Reporting API only
queries for existing reports, which is not appropriate, because I
don't want to force a user to create report in Google Analytics, nor
do I want to be dependent on a static report.
Google Analytics Management API offers a way to query web properties. But apps are not in the list, because they are no web properties.
I'm pretty sure there is a way to do so, because the Google Play Console App displays the revenue per app and I assume their using a public API as well.
Solution:
As stated in a comment in the answer of Brett, the Google Analytics Admin API might be used to get a list of all accounts and their respective properties.
The Google Analytics Data API reports on a single GA4 property with each API request. However, a single GA4 property can have several data streams, and you can add one data stream for each app. This article describes adding data streams to a GA4 property.

What is the recommended way to validate subscriptions using Unity IAP with the new Google Play Billing library?

The newly available Google Play Billing library does not support the SubscriptionManager of Unity IAP.
Usually, I would validate the receipt with the SubscriptionManager and check the is_subscribed, is_expired, etc attributes and act accordingly.
The documentation of Unity is not up to date with this new information. The Google Play Billing documentation offer no solution or insight as to how to validate that a subscription is still valid. "Not supported" is hardly a valid response, subscriptions are part of a lot of games and software made with Unity.
How can I validate that a Google Play subscription is valid and not expired in a Unity Project using the Unity IAP. Failing to be able to use Unity IAP, any other solution or insight is welcome.
It appears that this new plugin makes it mandatory to validate user subscriptions server-side. When implementing the plugin, I had to create a back-end service that provided the expiry date back to our app since we couldn't use SubscriptionManager to grab that information anymore.
I can't really recommend a specific way of doing this, because everyone's back-end will be different. For us, we utilize Docker containers on DigitalOcean droplets that our app and database can communicate with. This allows us to have a centralized location for back-end services, which we write in Python using Flask.
We have set up one that can go through our database, find every subscription that has expired based on the saved DateTime, and validate whether it has renewed or not. We added an extra endpoint to that service for grabbing the expiry date of a Google Play subscription, as mentioned above.
Subscription information can be obtained by accessing the Google Play REST API's purchases.subscriptions.get. This will return a SubscriptionPurchase object, which provides relevant information that you can then process to find out attributes such as is_subscribed, is_expired, etc.
It may be possible to send this directly from your Unity app/game, however this may also make man-in-the-middle attacks possible (admittedly my knowledge in this area isn't quite there, so I recommend you do your own reading on this).
Also as just a general suggestion, I recommend you try to post questions across both here and the UnityIAP sub-forum. The UnityIAP support folks are super active and even if they can't help because this is a Google implementation, it should definitely put it on their radar! I try to post there whenever I can as it allows them to make improvements to UnityIAP. (:
Yes at the moment we should use server-side API for getting Subscription related info. As SubscriptionManger was dependent on developer payload which is deprecated. See 2nd para https://developer.android.com/google/play/billing/developer-payload

Can I still use firebase's features & firestore database, if my app has been suspended from Google Play?

So, what actually happened is that, I had an app named X on Google play. It was getting around 400 downloads everyday and it was just 3.5 months from its launch when Google suspended it due to some policy violation.
The app X was getting very popular among the users. So the users started to demand the app again. Therefore what I thought is I should distribute it using some other medium or maybe create own website for the app.
And here is the main question. My app was using in-app purchases and also some firebase features. Now I would have to implement some other type of payment gateway and will also need a server. And my app is already on Firebase. So, its the best option for me to use it. But, I am little afraid, that if I keep using firebase, will it be safe ? Are there any chances that Google will close my firebase project as well ?
It is safe to keep using firebase as your app violated the policy of Google Play not your firebase project and as you told you are thinking to distribute your app through website so it's totally safe. Also if it makes you feel any better my app was also suspended from Google Play but i can still use my firebase project & it's related services.

Are Real-Time Developer Notifications necessary to be enabled for implementing In-App Purchases in an Android app?

Currently I'm trying to learn how to use Google Play Billing Library V1.2 for implementing In-App Purchases (IAP) - Subscriptions mainly in my Android app.
While looking at Add subscription-specific features, I came across this:
Also, before reading the rest of this page, you should also have
real-time developer notifications enabled. Real-time Developer
Notifications allow you to react proactively to state changes, to
increase your engagement, and to reduce user turnover.
And when I tried to check Add real-time developer notifications, it told me I needed to setup Cloud Pub/Sub using my own Google Cloud Platform (GCP) project.
Then I checked GCP and found that it is a heavily paid service which I can't seem to go for, considering that it is my first app that I'm talking about.
So, my question is that is it really a must to enable Real-Time Developer Notifications for implementing subscriptions in an Android app? If yes, do we always have to go through a paid service like GCP to achieve this or are there any free options too?
No, I just added a subscription to an app and didn't do anything with real time notifications.
If you do not implement RTDN then you have to poll Google API periodically to get the latest user information and you have to do it for all of your users (it is paid, you do not want to excessively use it). You also have to implement the logic for that, and I would find this quite fragile and inefficient. Moreover, you will have to manage cases such as revoked, canceled, etc. from your back office(if you have any) or you are gonna have to manipulate your database manually. Coming back to your questions, it is not a must but you will have a lot of benefits from implementing them.

How to save data using Google sign-in

I've just implemented Google sign-in into my app using the course on Udacity, the developer docs, and a sample on GitHub as resources.
The reason I chose to add sign-in into my app is so that the user could access their data on any devices where they are signed in to that account - i.e. the data would be saved on the cloud, so to speak.
However, I could not really find anything in the developer documentation, or on the Udacity course about how to save data to the cloud using the Google sign-in.
I've looked at the answer to a similar question on Stack Overflow which suggested using the Google Drive Android API to do this.
I've also had a look at databases in Firebase, which is completely new to me.
All of this leads me to believe that I need to use my own server to store the user's data (such as Firebase, I think, which is a paid service), or I should use the Google Drive API.
So, my question is, is there a particular API to save data to the cloud using the user's Google sign-in, or would I have to use my own server, or the Google Drive API?
Edits:
To clarify some points made in the comments, I'm assuming Firebase is a paid service from it's pricings page if I want over 100 simultaneous database connections (which I don't need now, but soon I may have over 100 users saving data simultaneously).
I am aware Firebase has its own authentication system, but I hadn't considered using Firebase until I realised I need somewhere to save the data, which is why I didn't start using it from the beginning.
I know that Firebase isn't the same as Google Drive, but I was wondering which would be best for my purposes. My app currently reads/writes data to an SQLite database on the device. I want to save this data based on the user's Google account, so that they can sign-in on a different device and have the same data.
Don't know if it's too late...but
I had a similar thought few days back,came across this document about Google-Drive Api.
This can be used for storing your app's data, which will be retried using the same login.
similar quesion

Categories

Resources