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
Related
I'm trying to learn MediaSessions. I did a lot of research for music player which has MediaSession to learn how is it working. I found nothing about MediaSession. All music apps examples on youtube doesn't have MediaSession. I'm new in android and I did a music app but I didn't use MediaSession thefore I can't handle with headset keys, for example hook key . I really want to learn proper way to make an audio app.
Could you give a sample which is playing dummy audio with MediaSession and contains play and pause features please. All I need a sample Thank you.
The Universal Android Music Player Sample shows how to implement an audio media app that works across multiple form factors.
In the full guide, there's a media session and controller section you'd probably like to read.
You can find MediaSession implemented in the UAMP sample inside MusicService.
Other great resources:
Our new TV Reference App is tailored more towards video experiences on TV.
See also my codelab that steps through the basics of supporting MediaSessions.
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.
I am developing an application that will be use to record video in background once the video calling starts.I googled about it but didn't get any solution. Many articles say that it is not possible.
Please let me know the way to implement the functionality
What you can do is that you can simply record the screen of the phone. There are several libraries available for implementing that. You can trigger or alert the library to start recording the screen once the video call starts.
I am developing a musical piano app for android, in this app i want to record sound which user play by clicking piano buttons. I am using soundpool to play piano sounds. now for recording android gave us two api's MediaRecorder and AudioRecorder. but for both we have to set MediaRecorder.AudioSource. i didn't want to record sounds from mic because user sound can be included and more important sound quality decrease in recording. then i try to read bytes of that resource file which is played on clicking piano app. and when user click again and again then bytes will be together in global byte array. but when i play global byte array then this play only one resource file and one time only.
More important thing is i am new to android development. kindly guide me.
Although i did not find answer of my question, but now i am using technique for recording aspects which i want to share with all of you. Above function which i try to use is totally wrong option when you are trying to save music created by your app at run time. now for my first version i just saving the clicks of piano buttons along with system time in an array. now when i play that clicks it will play same sound as user try to record. i save these notes in database for further reuse by users.although this is not solution because these notes will be played in our app only, but this is good feature which we can add in our app. when i solve the correct solution, i will share with you guys
I was playing around with the new Google+ application on the Android and I had a technical question that I couldn't seem to find online. How does the instant upload hook into the native camera application?
I can turn on a feature in the Google+ application and any pictures that I take with the native camera app are automatically uploaded to a private album on Google+. And this seems to be true whether the Google+ application is currently running or not. Is there any type of hook that I can register a callback event for in my application to access "just-taken" pictures for some post-processing goodness? I'd really like to tap into this functionality for an application that I am currently writing.
Any insight or hints in the right direction are greatly appreciated! Thanks!
Not entirely sure exactly how Google+ does it, but one way that would work is to use the ContentObserver interface: grab the MediaStore.Images.Media ContentProvider and attach a ContentObserver to it. Anytime a camera image is added, you'll get a notification and you can process it accordingly (including uploading).
Same technique would work for just about any ContentProvider that properly handles ContentObservers (which I'm assuming is all ContentProviders, but you never can tell).
Thanks to Femi's answer in this post, I was able to take what he said and figure out how to emulate Google+'s Instant Upload feature. I wrote a tutorial about it here:
http://www.jessechen.net/blog/how-does-google-plus-instant-upload-work/