How to implement Gmail connection in Android games - java

I am a beginner Android developer and I am working on my first Android game
We all had the experience of Android games. When we enter the game, game ask us to connect via Gmail to it can save the progress of the game for us.
Now what should I do if I want to add something like this to my game?

You have to use google play services for this purpose. As there are many scenarios for login in and saving data from your game, it would be better you go through the following documents for sign-in and saving game data.
As you didn't mention that what you using to develop your game, the installation instructions can't be given specifically. For Android Native, you have to add a dependency on your build.gradle. For game engines, you may have to use packages/libraries developed for that purpose.

Related

Android. Google Play Services Saved games API

I'm on the way to implement the Cloud Backup of progress that player achieved in the game so Saved Games function provided by Google Play Services looks like what I need.
After reading this documentation page about Saved Games I realized that it is not exactly what I need. Following the guide I have to show the new Activity for user where he's saving/loading the game progress, but I dont want to do that.
According to my idea no additional activities should be displayed, I want to do this on the background as non-visible for player task. Is there any way to do this the way I want?
I would appreciate any ideas. Thank you.
I think Google Play Games support automatic saving and loading. According to this video: Game On!: Cloud Save
7:26 of the video:
"the game does save to the cloud automatically"
and 7:55 of the video:
"And I'm just going to force a Cloud Load here by going into the Cloud Load menu. Notice that normally this would happen automatically"
What you have read in the document is the force save and load that can be seen in the Cload Save video.
If you notice:
Loading Saved Games
To improve your game's performance, you are encouraged to perform saved game loading as a background operation rather than in the main thread. One way to do this is by using an AsyncTask and override its doInBackground() method to open the saved game.
Here are github that can help you with save games implementation:
Google Play game services - Android Samples
AutoSaveUnitySample
Google Play Games plugin for Unity

Creating android 3d game with Android Studio and Unity

I'm trying to create a TBS game with an isometric view for android. I began with Android Studio and I've already designed core parts of the UI including login, registration, authentication, and menus. I'm now trying to create the actual game and I've discovered that in order to make a 3d game, the only reasonably efficient path is to create the game from an engine like Unity3d. Is this true? How can I keep the progress I've already made while doing this? For example, is there a way I can launch and instance of the Unity game and pass the variables needed, while the rest of the app is made using Android Studio? Unity uses C# and I'd prefer Java, is there a way around this? The authentication and user information currently uses Firebase, if I need to rebuild this app in Unity, how can I use Firebase? Thanks for the help.
Check out this: https://www.assetstore.unity3d.com/en/#!/content/58337
That is the firebase API that you can use within Unity,
I do also believe that Unity has some features available for UI so you should be able to build it completely within Unity. Also, you can write the scripts in C#, JavaScript but I don't believe Unity supports Java for scripting out of the box.
Edit
I also just realized, C# is pretty similar to Java, you should really like it.

Storing and retrieving user data in android apps?

I'm very new to development and would like to create an app for an android TBS game that I would also like to build on later by developing a desktop application. I'd like to know how to go about storing user data in a secure way that would allow the user to be able to sign in on a possible future desktop application. From what I've read on data storage, I think what I need is to store a sheet containing fields for the user's email, password, username, and a class containing player specific stats on a web based service. How can I also take advantage of google play services to help me with this? Thanks in advance
You could start by looking into Firebase, a platform that was acquired by Google and has seen some great overhauls lately. It gives you free storage and database space (up to a certain level of usage of course) and works cross-platform for Web, Android and iOS.
Check out https://firebase.google.com/ for the docs and some quick-start guides as well as presentations from the latest Google IO: https://www.youtube.com/user/Firebase/videos
Android Game Services allows you to Store user data, to set achievements, to share informations with social medias, to make a leaderboard and to make a multiplayer game.
https://developers.google.com/games/services/
You should use them for cross platform purpose.
You can check Android Doc in storage options:
Data-Storage
If you want share in future the data with desktop, you will need the data in some online storage. Check Firebase, from Google, or Parse.
Firebase
Parse

How to convert Tasker app to native app?

Using Tasker for Android (link: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) and a widget-composing tool, Zooper (link: https://play.google.com/store/apps/details?id=org.zooper.zwpro ) I have automated my Android phone to automatically register certain data whenever the phone enters or leaves certain WLAN-covered areas or connects/disconnects to certain BlueTooth devices.
The registered data is kept in simple Tasker-variables and a widget simply displays (some of) the contents of those variables to the user - it is really that simple.
Together this system works like an ever running background application with an always-updated (simple) user interface (the widget).
I am so happy with what this system does that I now want to convert the whole thing into a real, yet very tiny Android app that can be download and installed from Google Play.
However, I never developed an Android app before (and not an IOS app either!). But being a professional C# developer (and former C++ developer) for Windows desktop applications and Windows services for many years now, I feel confident that I can also learn how to make such a simple Android app, even if it involves programming languages with which I’m not so confident by now (Java for example).
What I need is a few directions to get me started the right way:
Which tools do I need for making such a simple app?
Can it be done in Visual Studio, or do I need to use Eclipse or
Xamarin?
Can it be done in C# or must it be done in Java?
Do I need to buy licenses for development tools (other than Visual
Studio) or can it be done with free software?
How would you go about the whole thing?
Any input will be much appreciated!

Libgdx and server game

I wish to create a multiplayer card game but with a server side.
I develop on Libgdx (android) for visual.
I succes to connect my application with Google Play Service because i think i can use the google play account for create the information i need for my game in the server. Like number of victory, number of defeat...
I 'm really confused because I feel wrong. Should I continue with google or create my own login and create an account on my server directly with socket ?
Thank you very much
(and sorry for my english)
You should, if you can, take advantage of the Google Play infrastructure for tracking the state of your game server. It should solve a lot of problems for you (especially identifying users reliably) vs rolling your own infrastructure.
One downside of the Google Play infrastructure is that it only works on Android devices (so if your Libgdx app also runs on other platforms, those will need a different solution).
Google Play infrastructure also assumes that your Android clients can talk to each other and can push simple state (like win/loss values and saved game state) to the Google servers or between each other. I don't think there is any support for running real server-side code with Google Play infrastructure (though you may be able to leverage the sign-on, at least).
Have you seen the Libgdx documentation and code tutorials here: https://github.com/libgdx/libgdx/wiki/Google-Play-Game-Services-in-LibGDX

Categories

Resources