I would like to manage consent in my app, because I use google analytics and crashlytics. In the google doc (https://developers.google.com/tag-platform/devguides/consent) I found how to manage consent in a web app and successfully did it, but in android I need to update Androidmanifest.xml and in the doc (https://developers.google.com/tag-platform/devguides/app-consent?platform=android#java) it uses java or kotlin code to do. I'm not sure if I can use java/kotlin code in an angular app, and even if I could I don't quite understand where should I copy that piece of code.
Related
I am building an app using , so the first time I upload the app to playstore, it will go with pre-defined Menu options and other stuffs.
Now, suppose I want to add a menu option in the Header of the App for any festive seasons or some awesome offers, and on clicking the menu, I should display the latest offers.
Is there any way to implement this feature without having to go through the process of again uploading to appstore and making users to update the app??
There is a concept of Over The Air (OTA) updates which you are referring to here. This is provided by Expo (by default create-react-native uses expo), firebase and Microsoft code push. You can read about it more here on official expo docs. If you are not using Expo then i prefer Code Push
Build an api endpoint you call at the app startup seems to be the easiest way to do this. Take a look at firebase if you don't want to build a full api and server yourself. Cloud functions are easy to use and could do the job in your case.
I'm just getting started with using the Google Drive REST API in an Android app. (I can't use the Google Drive API for Android because the app needs to share files, and perhaps a few other things, that GDAA doesn't support.) I'm stuck on a couple of points.
The first has to do with OAuth2.0 credentials. I went through the Android quick start example and it works fine. I set up a project on my Google developer console and generated an OAuth2.0 client ID and secret and also downloaded the JSON credentials file. However, the quick start example doesn't show how to plug any of this into the app. The only thing I found in the docs that seems relevant is GoogleClientSecrets, but I don't see anything about how to use that in an Android app. (The Java quick start example uses this, but it's not integrated with Android's account manager and doesn't seem right for an Android app.) When I run the Android version of the quick start app, no activity shows up on my developer console, which suggests to me that the app is running in some sort of anonymous mode. As I understand it, that would limit the app to a very low daily quota of transactions.
Second, I noticed that the GDAA and the REST API for JavaScript both have nice file picker APIs. I couldn't find anything similar in the Java/Android API.
So here are my specific questions:
How do I use my app's OAuth2.0 credentials from the developer console in a REST API for Android Java app? I feel like I'm just missing something obvious.
Is there a file picker API for the Google Rest API for Android?
After stepping through the library as I executed the Quickstart example (a painful process, as there is no source code), I discovered the answer. It turns out that you need to specify the client ID in the manifest. Specifically, you needs the following under the <application> tag:
<meta-data
android:name="com.google.app.id"
android:value="app ID from your API console"/>
Once this entry is in the manifest, then when the app uses the Google Drive REST API to interact with Google's servers, the transaction is correctly logged as traffic in your app's console. Without this entry, the app seemed to work in my testing, but no traffic was logged. I seem to recall (from an old Google I/O video) that such "anonymous" apps still work, but have a very low usage quota (something like 10 or 100 queries/day).
For those who are curious, I found this key in the class com.google.android.gms.common.internal.zzz, found in the play-services-basement-10.2.0 library.
Save the client_id.json file downloaded from the Google API console into into your app's src/main/res directory.
I was stuck exactly the same, but after I built my app with the file included the Google API started working.
How do I use my app's OAuth2.0 credentials from the developer console in a REST API
The pages around https://developers.google.com/android/guides/api-client give you all that you need to know. In particular, note the Java Quickstart you were using is for generic Java. The way Google Play Services on Android manage credentials and accounts is very Android-specific.
Is there a file picker API for the Google Rest API for Android?
Not that I know of, but depending on your use case, you might be able to use the GDAA picker. Ultimately, both GDAA and the Java REST API are layers above your Drive storage.
My current Android application allows users to signin using the Google Plus button.
A feature of my application is that i would like to reward users who return within a month of first signing in.
Do i have to remember when they first signed in using Google Plus?
Or does the com.google.android.gms.plus API expose this detail? e.g. initial Sign In date cross referenced to my Application.
I have searched the com.google.android.gms.plus docs but couldnt see anything.
Did i miss something?
I'm not aware of a G+ API that tells you when a user first authorized an application. I would recommend using Androids app data storage. That should be pretty lightweight. You can also open a feature requests.
I am not currently using Facebook's Android SDK in my Android app, and I only want to integrate it enough to capture installs via Facebook Mobile App Install Ads.
The documentation describes the need to "[c]omplete your Basic page under App Settings." If I enter my app's package name--and only its package name--I get an error:
You have specified Package Name, but you did not specify Class Name. Launching a native Android application requires both.
I don't want or need my app to be launched, do I? I only want to track conversion rates of ad clicks to app installs (and runs). The only way I can get the Promote link to show up on the left is to supply values for Class Name and Key Hash and set Facebook Login to Enabled. Is this really necessary?
Yes, it is necessary to fill out those basic details to use our SDK, however, those fields are only used for login authentication via fb - which is the most popular use case for our SDK. Your app will not be launched or anything like that if you supply those fields. For your case, just fill them out and leave it as is and you will be able to run ads without worrying about anything else.
The API requires these fields. Although in my experience it doesn't launch your app. It is merely used for the credentials in the development side of the Facebook integration in www.developer.facebook.com
Hope that helps.
RF
Now we can use google clound print on our application. But I found nothing download in its site which only has a simple document.
What I want to know is where can I download the API and where can I get an android example using google cloud print.
Thanks in advance.
Still the API for Android phone is not availabe. I also checked its website and its giving '404' Error. Instead you can use Cloud Print App and can integrate this app in your android app to print jobs of your interest.
you can find Android example how-to here:
https://developers.google.com/cloud-print/docs/android
It uses WebView, and don't forget to add Internet permisson into manifest, if you don't have it there yet.