Is there a way to check where from app is installed - java

In my project I want to know from what website or android market, my application has been downloaded and installed.
Now I see two ways:
1) Use mobile browser storage to save location
2) Generate application for each site in the system
Both of them enough for my project, but I want to know if there is another legal ways through Play market

PackageManager.getInstallerPackageName() will give you the package name of the app which installed the app with the package name passed in as a String.

You're looking for Google Play Campaign Measurements
Google Play Campaign Measurement allows you to see which campaigns and
traffic sources are sending users to download your app from the Google
Play Store.

You can create multiple apk files, one for every distribution channel you have.
In your project, create a config.json which contains the information you want to know about the installation and current version of the installed apk file of your application. The contents of the file, varies based on the distribution channel. For example, for the version you want to upload to Google Play, it can contain :
{
"channel" : "google-play-store",
"campaign_name" : "fall 2016"
}
Now, when the user installs and runs your application for the first time, read this config.json and send this information to a remote webservice of your own, to collect statistics.

Related

Get backup folder information using Google drive api

Is there any way to get Google drive backup folder information or the time when android device apps where last backed up?
I am making an android app which checks the last backup time
I believe that the backups are saved into an application data folder, an special hidden folder that saves application-specific files. Every application has one and can only be accessed by it. This means that you won't be able to access it with your application.
References
Store application-specific data (Google Drive API v3 guide)

Android : How to add QA build variant into the internal testing track to test the Android's in-app update API?

I have implemented the Android's in-app update API into my android application by following the steps given by Official documentation: Google Official Document and Google Official Document and now I want to test the in-app update flow with my QA build variant.
I am getting an error while trying to upload the android QA build variant into the internal app sharing upload page (internal app sharing) i.e. internal testing track of Google play console.
I am not sure but I think this happens because of different application id (i.e. package name) as I append .qa suffix to original application id. (applicationIdSuffix '.qa')
Is there any way to upload the QA build into the testing track of Google play console by keeping suffix to application id.
Also, the official document says that "To set the priority for an update, use inAppUpdatePriority field under Edits.tracks.releases in the Google Play Developer API. Priority can only be set when rolling out a new release, and cannot be changed later." Does that mean I won't be able to test the update priority with QA build environment and thus the immediate update?
Is there any way where I can test all the above things? Please help...!

App Links on Android with the app not installed

I am trying to implement app links into my app to make sure that other malicious apps cannot register for my URL.
I read the guide on app links here https://developer.android.com/training/app-links/verify-site-associations.html and I have mostly understood it. But one thing which is not clear to me is how can I prevent malicious apps from receiving my domain links if my app is not installed.
Consider this scenario.
1. My app is not installed on the user's device
2. Some malicious app is and it knows the URL that my app handles
Wouldn't this launch the malicious app and it can intercept my URL if the user selects that app from the disambiguation dialog? Is there any way to prevent it?
I understand that android:autoVerify="true" will trigger the domain verification when the app is installed, but what if the app is not installed?
Whether the user has the app installed or not, the "illegal" app won't be able to handle your links since it has not access to your domain in order to save there the needed JSON file. Am I clear?
There is a JSON file that is required during App Link configuration, that has to be uploaded to your server (that includes your app ID), through which your web-app basically says to the Android OS 'this is my counterpart on Android devices, I authorise it to handle these URLs'. Since app IDs are unique, there is no way another app can meet those conditions.
To quote the docs:
An Android App Link is a deep link based on your website URL that has
been verified to belong to your website.
So, although an app may register an <intent-filter> it ALSO has to be verified by the website whose URL it's trying to handle. And this happens on the server, so, out of the reach of a mobile client.
See also HERE for a more detailed explanation.

How do I set different endpoints for app in Google Play test/live?

I have an app which I want to release through the Google Play Store, but want to have the web service point to a different URL - between TEST and LIVE; can this be done? and how?
TEST APP -> www.myTESTserver.co.uk/service.asmx
LIVE APP -> www.myLIVEserver.co.uk/service.asmx
We have previously been building two APK files for upload, one with each URL set, but thought that there must be a better (correct) way of doing this.
The development process, therefore should be that the app uses www.myTESTserver.co.uk whilst being developed on my PC and when uploaded to the Play Store "TEST" area, but switch to www.myLIVEserver.co.uk when we promote it to LIVE (publicly available)
I would recommend using something like Firebase Remote config to configure the URL per version code.

Store files in google drive from Google App Engine

All,
I have a google application engine (java) that requires to store some images. I tried using Blobs and storing them in datastore but as you know there is a size limit on data that can be stored in datastore.
So as result I'm storing the images on a different server and store the path in my datastore and all works fine.
Now I'm thinking on using a google drive folder instead of using a server to upload the files to the drive and using the share link to display them later.
I've seen https://developers.google.com/drive/web/quickstart/java and got it to work fine. When I try to use it in my application however obviously this won't work as the code is assuming a credential for a local user.
I created a service key on my application and want to change the sample code above to use it but I'm not sure if that's the correct approach.
Tried searching for samples but can't find anyone that takes the same approach. Is there a working sample that shows how to authenticate an application not a user and let's say store a file in google drive?
I've also seen https://developers.google.com/drive/web/examples/ please note what I want is to store files in my google drive and not the user's google drive. So if user A and user B come to my app, they shouldn't have to authorize my application and should both be able to upload a file to my google drive.
I don't know if this can be done directly from their browser or I have to move the file to my application (appspot) and then push it to google drive.
Thanks

Categories