This is just a library project that is going to be distributed as an aar file. When an app is made using this library, I want to be able to see the device info and stuff in my Google Analytics Dashboard.
I however don't want the app developer to add anything to his code to provide me these analytics.
I wanna know if such a thing is possible. I could'nt find a solid answer to this question in any website.
I have a library which makes use of Google Maps. When I give out this library how do I handle the api key scenario and registration of the client app on my google dashboard for the maps to be loaded on the android app?
Is there a way that I don't manage the maps and the client using my library just does it?
So, the solution was pretty easy.
What needs to be done is remove the mention of the API key in the manifest of the library. And ask the one implementing the library to put an API key the application module's manifest.
This is a very good solution as this takes away all the headache of management of the API key from the library and gives the handle directly to the user of the library.
Many thanks to Christophe Beyls for the solution.
We are writing an application in Unity3D for both iOS and Android and we'd like to use the provided Social API to retrive and post the highScores on iOS (using GameCenter) and Android (using Google Play Game Services).
To keep the application simple, its weight low and to avoid cross-compilation extra setups we'd prefer not to use external plugins (unless point 4 is true).
I googled around for documentation and tutorials and I found THIS ONE.
The implementation has been done in C#, but since the Unity guide also provides a c# version it went all straight forward.
However we couldn't manage to get this work, probably also because we don't understand well how this API really work.
First of all: the Unity guide states that "It [the api] provides a unified interface to different social back-ends, such as XBox Live or GameCenter", but in the implementation is not specified which social back-end is being used. How unity knows that? It switches depending on the platform?
Second: I understood in various guides that the GUI provided to show the leaderboard is directly provided by the host platform and from the console log i get these following success messages:
Authenticated, checking achievements
Error: no achievements found
Successfully reported achievement progress
but running the application in the editor, in a build made for windows or an apk used in BlueStacks, i get the same message when I call the function Social.ShowLeaderboardUI(); which is
ShowLeaderboardUI not implemented
I could expect it from the editor and the exe, but BlueStack emulates Android and i would be surprised if it doesn't provide the google play services. However i also read about a "sandbox mode" which is the one that should run in the editor and this leads to point three:
I can't find a way to set this sandbox mode, at least not from that guide.
Fourth point: Unity has a GameCenter class, but no classes for the Google Play Games Services, so: I can do what I want with iOS but I need an external plugin which implements the ISocial interface for Android?
Fifth point: How do i handle authentication in both sandbox and deploy mode?
As you can see I'm surely missing something on the coding side, conceptual side or both. Can you provide a step-by-step procedure on how to achieve what i need? I don't need to get pieces of source code, but if someone can explain me well how this API works it would be great.
Thanks in advance
For Android:
To integrate Google Play Service into Unity, you need to use a plugin. You can find the Google supported plugin here. You can find information on how leaderboards work here. Essentially how it works is:
You create the leaderboard in the Google Play Developer Console
You submit scores to the leaderboard created (at whenever you determin is the appropriate time)
Google Play Services sends a response back telling if it's a high score or not.
I suggest you take a look at the Cubic Pilot_4.6 sample as that demonstrates how to implement leaderboards. Also, you really ought to test this on a physical device, due to how emulators may have trouble handling Google Play Services and account logins.
As far as authentication goes, Google Play Services takes care of most of it for you. You can probably see more in the samples (Social.localUser.Authenticate).
Current implementation does only provide implementation for GameCenter and XboxLive. There's a property Social.Active which can be used to modify what social platform is used. You can set a object which implements ISocialPlatform but im not sure if that interface is fully open - thus, im not sure if anyone can implement that..
I want to implement Google Analytics in my android app. I'm not interested in eCommerce and Global Tracking. All I want to track is the screens visited and events generated by users.
Tried using Google Analytics V3 and it works fine.
Want to migrate to V4 (Should I?).
Google Analytics V4 is now integrated with Google Play Services, which is HUGE. I now get this 65K method problem in android.
Found a good article on that here. The Google Play Services Modular structure is for Gradle. I'm using Eclipse with the android SDK.
Is there any similar work around? Why add the huge library when you just want to use a part of it?
I'm working on an Android app where I need to write to a Google Drive spreadsheet. There's a quick start video on "Google Developers Live" that seems to go through most of the required steps, but for the library usage they just say to click some button in Eclipse. I'm not using Eclipse though and would like to make this work with a maven project.
What libraries are required and how can I get them all using maven?
Here's the part of the video I'm talking about: http://youtu.be/Ied1CjJ0iP0?t=9m41s
Also, I've found this SO post and the latest edit says to use the Drive API V2 but a google api client is linked. I'm not exactly sure what's needed or if perhaps something has changed since then.
You should use the Google API Java Client. Downloads for Drive are here: https://code.google.com/p/google-api-java-client/wiki/APIs#Drive_API